All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

What is the HEIC format and why simply renaming it to .jpg is a bad idea

Post cover: What is the HEIC format and why simply renaming it to .jpg is a bad idea
Table of contentsClick link to navigate to the desired location
This content has been automatically translated from Ukrainian.
Modern iPhones and some Android devices take photos in HEIC (High Efficiency Image Coding) format — this is a new image standard that allows storing high-quality photos in a smaller size than the usual JPEG. Efficient, right? But there are several important nuances associated with this format.

Browser Support

HEIC is not supported by all browsers. For example:
  • ✅ Safari (on macOS and iOS) supports HEIC.
  • ❌ Chrome, Firefox, Edge — do not support HEIC directly.
This means that if you upload a HEIC file to a website and try to display it — users in most browsers simply will not see the images.

Common Problem: Users Simply Change .heic → .jpg

To pass HTML validation when uploading an image (for example, through <input type="file" accept="image/jpeg">), some users simply rename the file from photo.heic to photo.jpg.
And, unfortunately, the browser cannot always detect this immediately.
What Happens Next?
  • The server or frontend thinks it is a .jpg, but cannot process it.
  • Errors may occur when processing the image, generating thumbnails, or viewing in the browser.
  • And worst of all — such files can "break" the image pipeline on the site.

What to Do (for Developers)

  1. On the frontend, check not only the file extension but also the MIME type (file.type).
  2. When validating on the backend, analyze the file content or use libraries that accurately determine the format.
  3. Inform users about supported formats.
  4. When jpg upload does not work - during debugging, check the mime-type. This Trojan horse can take time, so it's better to look inside right away.
HEIC is a modern and efficient format, but it is still not supported everywhere. Changing the file extension is not a format conversion, and it creates more problems than it solves. If you are a developer — check the format at the content level. If you are a user — it's better to use a converter than to rename.

This post doesn't have any additions from the author yet.

Task to check the correctness of bracket placement (Ruby)
May 21, '25 10:27

Task to check the correctness of bracket placement (Ruby)

meme code
meme code@memecode
How to find the maximum subarray sum in Ruby
May 22, '25 11:01

How to find the maximum subarray sum in Ruby

meme code
meme code@memecode
Google Ads for Dummies: A Step-by-Step Guide for a Successful Start
May 28, '25 10:21

Google Ads for Dummies: A Step-by-Step Guide for a Successful Start

meme code
meme code@memecode
What is jemalloc and how does it relate to Ruby / Ruby on Rails
May 30, '25 11:53

What is jemalloc and how does it relate to Ruby / Ruby on Rails

meme code
meme code@memecode
Jun 5, '25 01:52

[Fixed] uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

meme code
meme code@memecode
The preview in the network tab after the Chrome update has become very small.
Jun 5, '25 18:23

The preview in the network tab after the Chrome update has become very small.

meme code
meme code@memecode
Why is the choice of CMS important when developing a website?
Jun 29, '25 12:34

Why is the choice of CMS important when developing a website?

meme code
meme code@memecode
Error 403 on the website: what it means and how to fix it
Jul 24, '25 23:50

Error 403 on the website: what it means and how to fix it

meme code
meme code@memecode
What is vibe coding?
Jul 25, '25 21:51

What is vibe coding?

meme code
meme code@memecode
What is combinatorial explosion?
Jul 28, '25 11:50

What is combinatorial explosion?

meme code
meme code@memecode
What is a brain stack?
Jul 28, '25 19:37

What is a brain stack?

meme code
meme code@memecode
What is integer overflow?
Aug 15, '25 08:28

What is integer overflow?

meme code
meme code@memecode