Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author sewpafly

    (@sewpafly)

    False. The plugin never saves an image without the user pressing “save”.

    Thread Starter Dennis Visser

    (@den-plaza)

    Well, I openend two images without confirming to anything and it turned out that 4 of 5 different sizes of only those two images were added to the subfolder of the uploads folder. It was something that I saw happening myself.

    Plugin Author sewpafly

    (@sewpafly)

    Oops, you’re right. I feel foolish. That’s why there’s a trash can icon, it should delete them. I should probably add some code to automatically delete images.

    Thread Starter Dennis Visser

    (@den-plaza)

    Of course, the extra versions/sizes of an existing image should not have been created in the first place when a user just views an image in a plugin window and closes it with the intention of not changing anything. ??

    Plugin Author sewpafly

    (@sewpafly)

    Oh, this brings up an interesting issue. There are 2 image generation events I think that we’re talking about. When you load PTE, it calls the wordpress functions to get the current thumbnails (so it can display them in the view/preview areas). This generates several images, but would happen the same if your theme is accessing the same thumbnails. (This is the one that you are observing)(I think).

    After you select an area to crop and some thumbnails to generate the crops for, then PTE generates its own crops. (These are the deleteable images — until they’re saved, they are sandboxed in a ptetmp directory).

    What you’re saying is that PTE should track which thumbnails are actually generated by wordpress when PTE is opened, and either delete them when done, or prohibit their creation in the first place?

    Thread Starter Dennis Visser

    (@den-plaza)

    I can’t tell what excactly happens behind the scenes or what the best workaround would be. All I know is that I viewed an images with the plugin and closed the window without wanting to make any change or use any of the functions of the plugin. I just wanted to view what options there were. Then I found that additional images of different sizes were added to the folder, which (in my case) doubled the disk space required for that image, which I don’t want to be left with when I decide not to use the plugin.
    This is really all I can say about the matter. Goog luck improving you plugin.

    @dennis, I think what you are talking about is what WordPress does by default. A theme developer can use the add_image_size() function. The name, dimensions, and crop parameters in that function are used to create an new image when you Add New Media. This plugin specifically recreates those images. Looking through the code of this plugin, add_image_size() does not exist. From what @sewpafly says, he does create SOME images, but only to store in cache so as to overwrite the existing sizes.

    If you are finding too many images using disk space it is likely caused by another Theme or Plugin where the author has several sizes created.

    Also, by default, WordPress will usually try to create 3 sizes itself: large, medium and thumbnail. The settings for those dimensions are in Settings/Media.

    So, if I have an image that is 2000 x 1333, and left WordPress at it’s default sizes, I see the following sizes for that image created:
    Image-150×150.jpg Thumbnail size (generated)
    Image-300×200.jpg Medium size (generated)
    Image-1024×682.jpg Large size (generated)
    Image.jpg original image

    I hope that helps clear up any confusion here.

    I have the same issue but instead the plugin created PNG images when I cropped Optimized jpg is there any way I can crop and save and keep them jpg instead of png thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘It eats disk space’ is closed to new replies.