Disable image compression for WebP

It does cover webp as well. From several google pages the default compression was 86. You could also test to confirm by uploading a few with different settings in your functions. This issue on Github shows they changed the default quality to 82. https://github.com/WordPress/performance/issues/563. We can see that webp images use the same quality value … Read more

How to add embed image in comments?

You can do that by using the comment_text filter. It runs for each comment, so with some regex you can find all links in the comment and loop through them. You make one more check to make sure the link has an image extension (jpg, jpeg, png, etc). If it does, we can embed it … Read more

changing option for all posts

In the option table image_default_link_type is the key for that setting. So you can change its value with filtering. Please see below example. add_filter( ‘option_image_default_link_type’, function () { return ‘file’; }); With this, file will be selected by default when you insert media attachment.