I read an image using the FileReader API, then I store the image as a blob in Indexeddb for later synchronization with a server. Until then I want to display a thumbnail of the image. It seems suboptimal to add the image ie. to a canvas element in full resolution and then resize it. It seems a better solution would be to resize it before adding it.
After synchronization I want to delete the full resolution image and only show the thumbnail. (My main concern is storage limits in a web app, on a mobile device)
Is it possible? and how?