📜 ⬆️ ⬇️

MIME types for different browsers when downloading images

In the spring, he wrote a script that uploads pictures to the server. Sometimes files are not uploaded. The task seems to be quite trivial. As it turned out, when uploading pictures to the server, each browser checks its mime type. To avoid a situation where the file does not load, you need to check for the following types:

'image / pjpeg' , - IE
'image / jpeg' , - FF, Opera, Safari
'image / png' , - FF, Opera, Safari
'image / gif' , - IE, FF, Opera, Safari
'image / x-png' , - IE
'image / x-icon' , - IE, FF, Opera
'image / ico' - Safari

- this is a summary label for * .jpg, *. Gif, *. Png, *. Ico files in different browsers

')

Source: https://habr.com/ru/post/13888/


All Articles