27
Views
5
Comments
Solved
Binary Data photo saving as JFIF
Application Type
Reactive

I have JPEG photos being stored as binary data which I am then displaying on a reactive web page. If I right-click on the photo and click Save Picture As in Chrome or Edge, it is saving the file with a JFIF extension. Does anyone know if this is normal behavior or a problem with my app?

2022-09-30 21-28-30
Ricardo Sousa
Solution

Hi Dan,

The problem is not with your app, but with how the browser is interpreting the data. The file extension of an image is automatically found and set by the browser when no content type is provided.

The following page shows two possible solutions, but it will be a user by user fix...

https://ourcodeworld.com/articles/read/1550/how-to-fix-the-error-of-saving-jpeg-images-into-jfif-on-google-chrome-for-windows-10

Side note

It seems the JFIF extension is not that wrong, we are just not used to it.

JFIF is the file format; JPG is the compression method JPG/JFIF is specified in the JPEG File Interchange Format and JPEG (ISO 10918).  in https://www.archives.gov/preservation/products/definitions/jpg.html#:~:text=JFIF%20is%20the%20file%20format,well%20as%20JPG%20compression%20encoding.

Regards,

Ricardo

2022-01-05 23-55-28
Dan Kozlowski

Thank you. Is there a way for me to provide a content type or an extension to the browser when displaying binary data?

2025-04-17 05-42-16
Ajit Kurane

Here I found something on google but not sure how we can do with outsystems,

https://nspeaks.com/jpg-images-getting-saved-as-jfif-heres-how-to-fix/

Thanks,

Ajit Kurane.

2022-09-30 21-28-30
Ricardo Sousa

I don't think there is an easy way to do it with Outsystems. Maybe if you create an API as shown at https://www.outsystems.com/forums/discussion/39185/exposed-api-need-to-return-content-type-as-text-xml/ .

But I'm not even sure if it will help you, as the MIME type will state "image/jpeg" and the Windows registry will map that with the "JFIF" extension. Did you confirm your register is configured as shown on the post I shared previously? 

2022-01-05 23-55-28
Dan Kozlowski

Ok. Thank you. Yes, I checked my registry and the extension is set to ".jfif" as the post states. I'll have to look into why that is set that way and if it is possible for my organization to change that value.

Screenshot 2023-01-19 181243.png
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.