WordPress generating new image file with same width and height of original image
-
Hi,
Hope someone could help me out. I’m building a photography website, thus image quality is very important.
I’ve set up new image sizes:
add_action( 'after_setup_theme', 'ph_custom_image_sizes' ); function ph_custom_image_sizes() { add_image_size( 'ph-project-large', 9999, 640, false ); add_image_size( 'ph-project-medium', 640, 580, false ); add_image_size( 'ph-admin-thumb', 360, 360 ); }
I was hoping that wordpress wouldn’t generate additional image files, if the file uploaded would have the same width or height, as stated in the code reference webpage for add_image_size function. That way, I could control image size and quality.
Thing is, wordpress is creating additional files, even when width or height are the same the new image size. And it drastically reduces size (which wouldn’t be so bad), but also reduces quality (which for me is a problem).
Example: Uploading an image of 960×640 (exampleimage.jpg) generates a new file with the exact same resolution (exampleimage-960×640.jpg).
Any thoughts why this is happening?
Thanks so much for any guidance you could offer ??
- The topic ‘WordPress generating new image file with same width and height of original image’ is closed to new replies.