• Hello there,

    I have defined around 15 image size in my theme, after already reducing from about 25 sizes. You might try to tell me that I don’t need that many image sizes, but really, it makes sense to me to have them for Retina, non-Retina, mobile, extra large screens, different templates in my theme etc.
    I want to reduce the disk space used by my images on the server. So I have been thinking of two approaches and got stuck with both of them:

    1. I delete the original file after uploading, I still have some very large but resized files and that’s enough. I managed to delete the original file after upload, but now the preview images in the “Insert Media” overlay (when adding media to a post) won’t show anymore because the original image files are used there. Now I tried saving a 140x140px sized copy of the image with the file name the original file had using WP Image Editor. But I didn’t manage to save or rename any file.
    It would be way easier to just replace the image used for the preview in the “Insert Media” thing using a hook/filter. But I couldn’t find anything on that yet…

    2. This solution would make more sense and save more space, but I think it’s a bit more complicated. I have three post types in my theme and they all use different image sizes. However, the majority of my images I only need in one post type’s image sizes. So is there a way to define that an image uploaded to a post of post type “portfolio” will only be resized to the image sizes “portfolio-big”, “portfolio-middle” and “portfolio-small”? Or else, maybe, only resize images whenever they are requested for the first time?

    The whole media topic is a big and difficult one to me. I’m sure many people have fought the same or similar issues as I am fighting now, however it’s been quite hard to find anything useful to me.

    Any help appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter fabian.schmid

    (@fabianschmid)

    Anyone? I’ve been stuck with this for about a month (well I had a lot of other things to do as well..) and I really need to solve this problem. Thanks…

    Thread Starter fabian.schmid

    (@fabianschmid)

    I installed this plugin and it sort of seems to work. However, when inserting media (an image) into a post, the only image size option I have is “full size”. And I need my sizes there.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reduce Space for Generated Image Sizes’ is closed to new replies.