Storing meta about a cropped photo Want to know how to save cropped images in the database? The info about the images or reference to the cropped images in itself?

Working on a marketplace for artists where artists can upload their work. The way the app is designed, most artists asked us to provide them with a functionality to crop their images so they look good on their profiles

I propose two solutions and wanted to know if they are feasible:


When a user has cropped the photo, save that cropped photo in your storage and store the cropped photo's path in the table
I was exploring the internet and I found a library which allows the user to crop the image and when he/she's done, the library returns a meta object about the image, it's co-ordinates, width height etc.


I'd like to know your thoughts, the first one consumes memory, the second one causes rendering issue since I'll have to show the image based on the co-ordinates
Let's order things by complexity and performance.


The cropped image will be displayed many times.  And cropping is a rather complex process.  So, store the cropped image as a file.  Note:  By storing as a file, you can simply use an &lt;img src=...&gt; tag in HTML to fetch it -- no extra processing (for you) when providing the web page.
Given that you are doing #1, the rest becomes somewhat moot.  Yes, you could store the original image somewhere, plus meta info about cropping.  But will you ever change the cropping?  Or maybe the only real use case is when the user resends the image and you redo the cropping?  My point is, you business model now takes over and answers what to do for #2; not database considerations.