christophlehmann / imageoptimizer

TYPO3 Extension for lossless image optimization with binaries of your choice.
43 stars 22 forks source link

[TASK] Do always compress images and not only if processed #28

Closed sascha-egerer closed 2 years ago

sascha-egerer commented 6 years ago

Images have only been compressed if they where processed before. That means if an image for example has not being resized it got also not compressed. This is now changed so every image gets compressed.

christophlehmann commented 6 years ago

Hi Sascha, thanks for the PR!

I'm not really sure about it in this form. Given your original image would not be optimized you have a copy of your original in fileadmin/_processed/

I would not merge it in this form...

sascha-egerer commented 6 years ago

I‘ll push an update next week

christophlehmann commented 6 years ago

Let's discuss the aim first ;-)

helhum commented 4 years ago

Given your original image would not be optimized you have a copy of your original in fileadmin/_processed/

As far as I can see the file is only updated when the optimized version sha1 differs from the original. So there won't be copies of the original if the optimizer had not actually optimized something.

christophlehmann commented 4 years ago

@helhum If i remember it correctly....When i checked it the processing attempt was done again for every request... We later discussed at slack, but if you want you can take a deeper look at it and we will get it merged

helhum commented 4 years ago

Yeah. I think this needs extensive testing for the different scenarios. Looks like indeed the processing could happen multiple times, only the file copy isn't.