Quality Thumbnail 100
-
The quality thumbnail are 100%, If I have images compress to 100% in functions.php, true?
-
I’m not quite sure what you’re asking but the default image quality in WordPress is 82:
If you want to change that to 100, here’s some code for your
functions.php:add_filter( 'wp_editor_set_quality', 'set_editor_image_quality', 10, 2 ); function set_editor_image_quality( $quality, $image_mime_type ) { return 100; }I have this:
add_filter('jpeg_quality', function($arg){return 100;});Your filter is better? is for all images?
Your code should work fine.
wp_editor_set_qualityis for all images,jpeg_qualityis only for JPEGs.My plugin uses the functions that are built into WordPress. You don’t have to do anything special to set the quality for my plugin.
Thanks Alex, perfect.
If you use the plugin from list images run ok, but if like regenerate all images give API error, maybe is the conflict with jetpack. If can solve it will be perfect, because many users will have the problem. In this moment I no need support about it, is just one comment.
Have a nice day 😉
Hmm, I use the plugin with Jetpack on my site. No problems. Turn off the image CDN though otherwise Jetpack makes the thumbnails remotely.
https://jetpack.com/support/photon/
Or filter the quality for Jetpack-hosted thumbnails:
add_filter( 'jetpack_photon_pre_args', function( $args, $image_url, $scheme ) { if ( empty( $args['quality'] ) ) { $args['quality'] = 100; } return $args; }, 10, 3 );My last comment no was about quality, was about regenerate no run, give me error Api..
“Unable to fetch a list of attachment IDs to process from the WordPress REST”
If can solve it will be great, many users will get the error, and if you go to media list and select many images run ok. I no need support about it, because I no need use it now.I can’t reproduce this and I haven’t heard any other reports like that.
What’s the URL to your site?
OK, is the same issue of this:
https://wordpress.org/support/topic/unable-to-regenerate-images/
By group images run ok.That’s a different issue. Some people have been having problems because they have disabled the entire REST API but if that were the case with you, then regenerating all images wouldn’t work either.
Hi,
I tried the two codes presented here (your first code cited, and that of Guillermo77). But none seems to work (visible error in the dashboard, for both). Placed in the child theme, “functions.php”.
An idea why it does not work?visible error in the dashboard
What’s the error? It sounds like you have some malformed code in your theme’s
functions.phpfile.Effectively. I forgot to close “?>”. Now it works.
It is always said, “put this code …”. But rarely what way.
Thank you
The topic ‘Quality Thumbnail 100’ is closed to new replies.