Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 5 years ago

#7278 closed defect (bug) (duplicate)

Special characters in the EXIF data confuse wp_get_attachment functions

Reported by: arminbw Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords: exif iptc
Focuses: Cc:


Digital cameras often put special characters in the EXIF data of their images (e.g. German "Umlaute"). After uploading such images parts of this data are put into the database.

Afterwards the function "wp_get_attachment_thumb_url" will return the URL of the full-size image, instead of the thumbnail.

Attachments (2)

evil_exif.jpg (30.9 KB) - added by arminbw 12 years ago.
small picture with troublesome EXIF data
no_thumb_no_middle.jpg (37.7 KB) - added by arminbw 12 years ago.

Download all attachments as: .zip

Change History (5)

12 years ago

small picture with troublesome EXIF data

#1 @arminbw
12 years ago

  • Keywords iptc added

The second attached image (no_thumb_no_middle.jpg) contains no EXIF data, only a single IPTC entry featuring a copyright symbol (a not so unrealistic scenario).

After uploading, a thumbnail- as well as a middle-sized image are created.

But "wp_get_attachment_image($imageid, 'medium', false)" will only return the full-size image, thus breaking all layouts.

#2 @arminbw
12 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Just found http://trac.wordpress.org/ticket/6412 which adresses these issues.

#3 @DrewAPicture
5 years ago

  • Milestone 2.6 deleted
Note: See TracTickets for help on using tickets.