-
It would be nice to have options to don't save original image. In my usecase images can be uploaded by people which don't necessarily understand a lot about Images and sometimes upload images with unreasonable large resolution without real quality. So there is no reason to store original image. For this usecase images generated by django-pictures are good enough and original image just waste space on server. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @krtko1, Thank you for reaching out. You are asking an excellent question. It turns out, keeping the original image is a deliberate design decision. I agree users aren't necessarily proficient with encoders, compression, hardware acceleration or licensing, all which need to be considered when working with images. That's core to why this package exists. Users can upload whatever they have and engineers can serve images optimized for their use case. However, most developers are also having a hard time keeping with the codec wars. The truth is, what's good today, might not be sufficient tomorrow. Yesterday WebP was the latest and greatest, but really since 2024, you should use AVIF (which isn't supported by Pillow yet). Going from a copy, to a copy to a copy over the years will degrade your image. That's why we are keeping the source. To make your site future-proof! And yes, that comes at the cost of storage, but responsive image serving always does. However, the cost per gigabyte has dropped to around 1 cent (USD). What most data-centers really charge you for is traffic anyway. In summary: No, there isn't an option to drop the original file. Of course, you can modify this package to your needs, but I'd highly advise against it in this case. I hope this was helpful. Please reach out to me, should you have any further questions. Best! |
Beta Was this translation helpful? Give feedback.
Hi @krtko1,
Thank you for reaching out. You are asking an excellent question. It turns out, keeping the original image is a deliberate design decision. I agree users aren't necessarily proficient with encoders, compression, hardware acceleration or licensing, all which need to be considered when working with images. That's core to why this package exists. Users can upload whatever they have and engineers can serve images optimized for their use case.
However, most developers are also having a hard time keeping with the codec wars. The truth is, what's good today, might not be sufficient tomorrow. Yesterday WebP was the latest and greatest, but really since 2024, you should use AVIF (which…