How to add the HDR Media Type Badge to Photos with ExifTool on Catalina

by: 
Last modified: May 14, 2020 12:12 AM
4 1475 Last modified May 14, 2020 12:12 AM

Older versions of iOS (up to iOS 12) have added a HDR tag to photos taken in HDR mode. And this tag has been visible as a badge over lay in Photos for Mac. But the badge is missing for custom rendered HDR photos created with external editors.

Making the HDR badge overlay show on HDR photos is possible, if we install ExifTool (ExifTool by Phil Harvey).

The procedure described here has been tested with Photos 5 on macOS 10.15.4 Catalina and ExifTool-11.98. If you have an older version of exiftool installed, update to the newest version or the HDR tag may not be recognized.


Apple is marking HDR photos taken with the iPhone with a custom EXIF tag - for other HDR photos we have to set the EXIF tag "CustomRendered" to the value 3:

(https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html). The available CustomRendered tags are:

(only 0 and 1 are standard EXIF, but other values are used by Apple iOS devices)

0 = Normal 

1 = Custom 

2 = HDR (no original saved) 

3 = HDR (original saved) 

4 = Original (for HDR) 

6 = Panorama 

7 = Portrait HDR 

8 = Portrait


To set the HDR tag from the Terminal:


  • Install exiftool (ExifTool by Phil Harvey), then open a Terminal window.
  • Type the command below into the Terminal window and add a space character at the end of the line (with exiftool 11.98 or later)
/usr/local/bin/exiftool -overwrite_original_in_place -preserve '-CustomRendered=HDR (Original Saved)'

For an older version of exiftool use the line below, because the print strings have been changed between the versions.

/usr/local/bin/exiftool -overwrite_original_in_place -preserve '-CustomRendered=HDR'
  • Then drag the image file you want to modify from the Finder window directly behind the Terminal command (on the same line) and hit the return key. You can also drag a folder with images behind the command.

When you now import the tagged photos to Photos, they will show the HDR badge, even if the HDR image has not been created with the iPhone - I rendered the image files below with Aurora HDR 2018.



Or Set the tag using a Finder Quick Action:


The Terminal Command can be captured as a Quick Action to be run from the Finder preview. You can create it using Automator:

The Quick Action needs an action "Get Selected Finder Items" followed by a "Run Apple Script" action.

  • Paste this into the Apple Script part:
on run {input, parameters}
	(* Your script goes here *)
	tell application "Finder"
		set sel to the selection
		set p to sel as alias
		set pospath to quoted form of (POSIX path of p)
		do shell script "/usr/local/bin/exiftool -overwrite_original_in_place -preserve '-CustomRendered=HDR (original saved)' " & pospath
		--	set the clipboard to pospath
		return pospath
	end tell
	return input
end run


  • Save the Quick Action in the Services folder of the User Library folder.
  • Now you can select a photo in the Finder (exactly one photo) and run it from the Quick Action section in the preview of the image:


I love the quick actions in Mojave and Catalina, particularly in combination with the touch bar!


This user tip was generated from the following discussion: HDR Media Type and Photo Indicator - the previous version of this user tip does no longer work for Photos 5 and Catalina, also the formatting of the scripts has been broken by the transition of the forum software (https://discussions.apple.com/docs/DOC-13721) - do not use it any longer.


Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.