I am currently working on a client-side Drag and Drop file upload script as a bookmarklet. To prepare for the upload process, I am utilizing the File API to convert the images into base64 format and showcase them as thumbnails.
These are examples of how my current thumbnails appear. I am hoping to achieve a more square-like appearance without distorting their aspect ratio (please disregard the progress bar).
The desired outcome for the thumbnails is to have them centered and cropped based on the minimum height and width.
Is it possible to accomplish this using only JavaScript (adjusting styles through scripts)? Additionally, it's important to ensure that the solution is compatible with base64 images (after they have been converted via the file API as DATA URL).
You can view the exact set of images I have uploaded here.
Thank you in advance for any assistance provided.