Create Preview image with aspect ratio from base64 that are on DB

Hi there please help me to figure out the best way,

I have return results from API images that are encoded base64 that go to my DB

I need to preview this image in an aspect ratio, ( and if possible and the best way its to cut the size by 2 : ex image 1000x500 cut it and preview for 500x250)

already tried the HTML code but I can’t figure out how to take the aspect ratio to be proportional the image that I receive on result from API

HTMl code: <img width=“450” height=“330” src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAfQAAAFNCAYA~~~

Thanks you in advice
Best Regards

This topic was automatically closed after 70 days. New replies are no longer allowed.