- Issue created by @Anybody
- 🇭🇺Hungary tikaszvince
It is not scope of this module to batch process existing images.
There are plenty of solutions for bulk process files, which you can find here: https://tinypng.com/third-party#development
- 🇩🇪Germany Anybody Porta Westfalica
Hi @tikaszvince thank you very much for your quick reply. Sadly the link isn't helpful enough for Drupal, as Drupal stores metadata like file size and formats (and eventually even checksum, I'm not currently sure) in the database. So you should not simply batch-process existing files on the server without bulk-updating that metadata.
For that reasons it would make a lot of sense to add an action to do that in Drupal on file entities.
Of course I'm not asking you to do that as maintainer, we're happy to help and provide the MR.
- 🇭🇺Hungary tikaszvince
You request to make possible to modify the previously uploaded files. Anything can go wrong during the TinyPNG API communication.
And if an error is not handled, or if we overwrite an existing file with incorrect data it can lead to data loss.I cannot take responsibility for this possibilities, so even if the patch or MR will be created that will be no part of this module.
I suggest to create a separated module to implement this feature.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @tikaszvince. I have to accept that. Still I don't totally understand that point, because we could warn about that risk and do nothing, if anything (we can detect) goes wrong.
Furthermore you already have a feature to optimize uploaded images on upload. Same can happen there...
But yes of course, it's your module and you decide.