-
AuthorPosts
-
February 3, 2021 at 6:21 pm #1277430
Hi
how can i increase the image quality?
(After uploading and adding to a page/post images lost their contrast, & sharpness)
You can see it here: marcusjeroch.de/screens/quality.jpg
Left: How it looks on the webpage
Right: Before it has been uploaded)(its much worse when the image contains text)
marcus
February 10, 2021 at 11:25 am #1279366Hey Marcus,
What is the original size of the image? If bigger than 2560px, it is automatically resized by WordPress.
If that is the case, you can add following code to Functions.php file of your child theme to disable it
add_filter( 'big_image_size_threshold', '__return_false' );
If you would like to serve up double-size retina images with high compression, please use the code posted by user here – https://kriesi.at/support/topic/responsive-content-images-retina-screens/#post-1077293
Best regards,
YigitFebruary 16, 2021 at 3:54 pm #1281376Hi,
no, it was less than 2560.
I am also not talking about retina but thanks for the link anyways.I am talking about an option (i read it somewhere quite a time ago) to increase the quality by reducing the compression or so.
It was just some lines in the function.phpMarcus
February 26, 2021 at 2:08 pm #1283843Hi,
Sorry for the very late reply, perhaps the function you are referring to is this one:add_filter("avf_jpeg_quality", "avf_set_quality_mod", 9999, 1); add_filter("avf_wp_editor_set_quality", "avf_set_quality_mod", 9999, 1); function avf_set_quality_mod($quality) { $quality = 65; // compression level what you like in percent return $quality; }
But I believe this was used before the default_jpeg_quality was added to the parent theme (Enfold) functions.php, currently the function is:
$resp_img_config = array( 'default_jpeg_quality' => 100, // ensure best image quality - use filter avf_responsive_images_defaults to change 'theme_images' => $avia_config['imgSize'], 'readableImgSizes' => $avia_config['readableImgSize'], 'no_lazy_loading_ids' => array() // add is's of images for permanently disable lazy loading attribute ); $resp_images->reinit( $resp_img_config );
Please note the 100 in the code.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.