rendering image byte to browser
devfemibadmus opened this issue · comments
it works fine when we perform below but doesn't work in webpage like making html img attr
img = Image.open(io.BytesIO(requests.get(file_url).content))
img_bytes = io.BytesIO()
img.save(img_bytes, format='PNG')
img_bytes.seek(0)
response = Response(img_bytes, mimetype='image/png')
could the error be cors? nope i have set some cors rule still thesame then could it be bcus of the process thats done from the url?
but dont want to use send_file
@kcubeterm
fixed i found out i am using cookies even in the get of the image preview all to see lol my entire preview code is a shit......FIXED now and working fine