Skip Navigation

[Resolved] Toolset Blurring My Images on Upload

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by chrisB-30 5 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#1212460
toolset-compression-comparison2.jpg
toolset-compression-comparison.jpg

Hello,

Toolset is blurring my images on upload. I have attached 2 before and after images where you can see the image is clear before upload but gets slightly blurred when uploaded to Toolset image custom field.

Here are the urls where the images appear:
hidden link
hidden link

----------
/**
* No Image Compression Please
*/

add_filter('jpeg_quality', function($arg){return 100;});
-------------------

Is there some sort of image compression setting that I'm not seeing somewhere in the toolset settings?

I have this in my functions.php file - though I cant remember why I added it originally...

Thanks!

#1212559

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Chris

Toolset doesn't itself do anything to compress images, this comes from WordPress itself.

When you upload an image—the full-sized image—WordPress will automatically generate the other images sizes—both the standard sizes plus any other sizes you or your theme registered—and it applies compression to those generated images.

If you output an image with a Toolset shortcode that is a custom size which is not registered then Types will trigger the generation of a custom-sized image, but again using the standard WordPress functions, so that this would also invoke the compression.

In WordPress 4.5 this compression level was reduced from a default setting of 90 to 82.

It looks like you the code to your functions.php from an article like this one: hidden link

That should prevent the images you upload from being compressed (assuming the code is included in the functions.php of your active theme).

If the code was inactive for some time then the various sized images on your site may have been generated compressed. You could try running the regenerate thumbnails plugin in that case.

#1212947

Well it looks like I had to add:

add_filter('jpeg_quality', function($arg){return 100;});
add_filter( 'wp_editor_set_quality', function($arg){return 100;});

The first line alone didn't seem to turn off the insane wordpress compression.

But looks good now.

Thanks!