Right now when you upload an image, it 's fully uploaded as is. In some cases like .heic file support, it’ll make sense to convert the uploaded file into a normal image format (eg jpg or webp). During that step it might also make sense to resize the image if it’s really big. i.e. it’s coming straight from the iphone camera roll.
Because too many large size images on a page impact page performance, should we also resize giant regular size images too? Like a really large jpg or tiff file.
The downside of resizing is that you might have a scenario where you want to upload an image to kinopio to host it for use on another, like on your blog. Mysterious resizing might compromise that.
Here’s the most elegant way I can see this working:
- user uploads
- kinopio-server uploads the original file to
- if the file is really big, the server resizes the image (and convert from
heicif needed) and uploads it to
After the upload is complete:
- if the file was resized/converted, the server tells the client to use
-smallurl in the card
- otherwise the normal url is sent back as it is right now
With this scheme, experienced users know (or can guess) that if they can remove the -small from the name they’ll be able to reference the original upload wherever.
Some outstanding questions:
how big is too big (i.e. what should the size cut-off be before resizing)? should it be based on file size, or image dimensions?