Setting JPEG compression for custom image sizes doesn’t work in specific cases

I have a custom image size hello-image: add_image_size( ‘hello-image’, 700, 300, true ); Whenever an image is uploaded, I compress the cropped hello-image sized image to 40% JPEG compression. It works great in all cases except… The problem If the width of the original image is greater than 700px it works just fine. But if … Read more

Twitter image encoding challenge [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Set JPEG compression for specific custom image sizes

I use various custom image sizes (by add_image_size) and I have set my JPEG compression to 30% with this filter: function jpeg_quality_callback($arg) { return (int)30; } add_filter(‘jpeg_quality’, ‘jpeg_quality_callback’); If I am not mistaken, the above code compresses all of my custom image sizes with 30%. Now, for two of my custom image sizes named splash1 … Read more