Open ttattl opened 2 years ago
In this problem, also we need to think about the image for the visualization and image for the storage. Should we create another clone image (with small size) for visualize (and connect with front end)? I am thinking...
Not 100% sure yet, but thumbnails (a small image representation of a larger image) can be a good solution here. It's nearly always best to generate thumbnails server-side. It's fast and doesn't duplicate computation over multiple clients. In most cases, I would probably create a cloud function to generate thumbnails of a fixed dimension and set it up to be triggered by a storage event. But am also thinking...
@ttattl check out this from Cloudflare: https://developers.cloudflare.com/images/image-resizing/resize-with-workers/. That can be really useful!
We need to keep in mind whenever we build this caching mechanism that the images of the client should not be shared across third-party providers if possible due to security reasons.