0

I have installed a compressing plugin (https://wordpress.org/plugins/tiny-compress-images/) in Wordpress to minimize the file size of all the images that I upload. Works really well, the only problem is the following:

If I create a new page, insert a picture and resize it manually in the editor Wordpress seems to create a new version of the picture with exactly the resolution that I have chosen. For instance I have a newly created file called airline-768x447.png in my uploads folder that was apparently created by Wordpress when I resized the original image in the editor to this size.

The problem is that this newly created file doesn't get compressed by the plugin and therefore its file size is way bigger than it should be.

Why isn't wordpress just using the original file and just resizes it using css or the width and height attributes? Is there any option to turn off this behavior where Wordpress seems to create images with individual size?

I have searched for quite a while but couldn't find any solutions. Thanks :)

  • 1
    Using the image editor you can do more than just resize an image, and using CSS on the frontend isn't reliable. CSS won't handle cropping, contrast changes, flipping horizontally, etc. In all honesty this sounds like a bug in the plugin rather than something WP Core is doing wrong – Tom J Nowell Nov 10 '16 at 16:21
  • What would you want to happen in such case? You explicitly use UI to resize image, but want image not to resize? – Rarst Nov 10 '16 at 16:38
0

You will get more details if you Google this : add_image_size()

Or Reading this https://developer.wordpress.org/reference/functions/add_image_size/

Each theme or plugin can register new image size that are create autmatically when a media (image) is insert in a post or in the media uploader.

You can remove them if you want with the function remove_image_size...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.