We have recently upgraded our CMS setup and have moved to the resizer service you implemented. One of the issues we’ve noticed having a closer look on everything is how assets work when they fail.
If my understanding is correct, a resized asset is stored (a network drive in our case) and does not need to be resized again for the same settings as long as the download is able to read the file.
The resizer when run attempts to resize the original photo, but when it fails serves the original file while adding it as the resized file for future use.
Our problem is two fold.
-
Occasionally download fails, causing the asset to be resized again. We are uncertain of why this is happening, its rather infrequent, but this issue is not greatly concerning if resizer works.
-
When resizer works everything is great. When it fails (could be due to lack of resources from a lot of requests at once, or another issue), it saves the original photo as a resized photo. As we encourage our staff to upload large photos to be future proof, one bad resized photo can more than 2x the size of our page. To put this in perspective our homepage with resized photos is about 1.5MB of image assets. A single photo not resized is 2.8MB. So one bad image can almost 3x the homepage. A lot of times when there is a failure (and pod needs to self heal), multiple photos on the same page will fail.
Would it be possible to add a configuration option that…
-
Logs when a resize fails and original image is served
-
Does not store the failed resized image in file cache so the next request can attempt a resize again.
I don’t know for certain, but our assumption is the system is in current form because as there is not full control over assets added to Squidex, having this enabled by default could be very costly, causing the same asset to try to resize on every request that may never resize properly. On our end, I believe all our assets should resize, or we could get with our small crew to use a different file, so serving the full image temporarily and then caching the correct resized photo will help give our users the best experience. Adding the log would help us monitor for a file that keeps failing on resize to fix.
Would greatly appreciate your assistance here, or further knowledge into system. We plan to have our asset storage grow significantly soon and I’m concerned these failures will greatly impact our page load and performance.