Make WordPress Core

Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#32378 closed feature request (wontfix)

Image Uploads automatically puts "Olympus Digital Camera" as caption

Reported by: vparkhere's profile vparkhere Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Media Keywords: dev-feedback needs-unit-tests has-patch
Focuses: Cc:

Description (last modified by azaozz)

Images from Olympus cameras are automatically given the caption "Olympus Digital Camera."

Steps to reproduce:

1) Upload image that came from Olympus camera
2) Alternative text and caption are automatically filled in with OLYMPUS DIGITAL CAMERA

3) Published image displays grey border with caption OLYMPUS DIGITAL CAMERA

WordPress isn't alone in this issue; Flickr, Picasa, Windows Live Movie Maker users have also reported the same thing happening when they upload images.

This may be due to #22768, there appears to be code for media to “Use image exif/iptc data for title and caption defaults if possible.”

This is an image that was uploaded May 5th:

And this was uploaded May 7th, after the update:

A similar ticket where EXIF/IPTC captions populate description/post_content: #22768

Attachments (8)

automaticcaption.png (139.5 KB) - added by vparkhere 9 years ago.
nocaption.png (486.6 KB) - added by vparkhere 9 years ago.
caption.png (486.5 KB) - added by vparkhere 9 years ago.
32378.patch (1.5 KB) - added by dmsnell 9 years ago.
Remove OLYMPUS DIGITAL CAMERA and use file name if present
P1010013.JPG (426.9 KB) - added by azaozz 8 years ago.
32378-2.patch (5.7 KB) - added by dmsnell 7 years ago.
add generalized system for replacing unwanted default image metadata
32378-3.patch (5.7 KB) - added by dmsnell 7 years ago.
oops - fix: spaces -> tabs
32378-4.patch (5.6 KB) - added by mattday 6 years ago.

Download all attachments as: .zip

Change History (31)

9 years ago

9 years ago

#1 @SergeyBiryukov
9 years ago

  • Description modified (diff)
  • Version set to 4.2

#2 @azaozz
9 years ago

  • Description modified (diff)

#3 @azaozz
9 years ago

  • Milestone changed from Awaiting Review to 4.2.3

@vparkhere thanks for the detailed bug report :)

Yeah, introduced in [31694] (#22768). Not sure if it is going to be enough to just remove OLYMPUS DIGITAL CAMERA when it ends up as caption, or have a deeper look at which EXIF fields can be used.

#4 @dd32
9 years ago

  • Milestone changed from 4.2.3 to 4.3

I'm shifting to 4.3, pending a patch into trunk which we can consider merging into 4.2.x

9 years ago

Remove OLYMPUS DIGITAL CAMERA and use file name if present

#5 @dmsnell
9 years ago

  • Keywords has-patch dev-feedback added

Some investigation revealed that this default metadata is bugging people on plenty of other services. I downloaded some sample images from different Olympus cameras and the data appeared fairly consistent.

I think that we should go ahead and remove the string when we find it and use other information if available. The Olympus cameras store the original filename in another field, which we should be able to use to match the behavior with other camera vendors.

The description field gets totally overwritten and I didn't see any obvious alternatives that Olympus is using. Regardless, if the user has modified these fields, this data will not be overwritten.

#6 @wonderboymusic
9 years ago

  • Keywords needs-refresh added; has-patch removed

@dmsnell few things:

add_action|filter() calls need to go into wp-admin/includes/admin-filters.php

It seems like the list of string we would want to replace will grow. Can you write the function to be more generic and optionally include a way to add more strings to a list of strings to be replaced?

#7 @obenland
9 years ago

  • Milestone changed from 4.3 to Future Release

Let's try again in a future release.

This ticket was mentioned in Slack in #core-images by ocean90. View the logs.

8 years ago

8 years ago

#9 @azaozz
8 years ago

P1010013.JPG is a photo shot with a very old Olympus camera that triggers this error.

EXIF data in it:

Filename - P1010013.JPG
Model - C2Z,D520Z,C220Z 
Orientation - Top left
XResolution - 144
YResolution - 144
ResolutionUnit - Inch
Software - 83-1056
DateTime - 0000:00:00 00:00:00
YCbCrPositioning - Co-Sited
ExifOffset - 146
ExposureTime - 1/200 seconds
FNumber - 2.80
ExposureProgram - Normal program
ISOSpeedRatings - 80
ExifVersion - 0210
DateTimeOriginal - 0000:00:00 00:00:00
DateTimeDigitized - 0000:00:00 00:00:00
ComponentsConfiguration - YCbCr
ExposureBiasValue - 0.00
MaxApertureValue - F 2.83
MeteringMode - Multi-segment
Flash - Not fired
FocalLength - 5.00 mm
UserComment - 
FlashPixVersion - 0100
ColorSpace - sRGB
ExifImageWidth - 1600
ExifImageHeight - 1200
InteroperabilityOffset - 482
FileSource - DSC - Digital still camera

Maker Note (Vendor): - 
Mode - Normal
JpegQual - High
Macro - Off
DigiZoom - 1.00 x
Software Release - D4083
Flash mode - Not used
Manual focus - No
Focus distance - 0.00
Sharpness - Normal
White Balance - Auto
Contrast - Normal
Image Width - 1600
Image Height - 1200

Thumbnail: - 
Compression - 6 (JPG)
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
JpegIFOffset - 6566
JpegIFByteCount - 5775
Last edited 8 years ago by azaozz (previous) (diff)

#10 @tpnotes
8 years ago

  • Keywords 2nd-opinion added

I stumbled upon this ticket yesterday and I am still startled, that anyone is thinking about working around a bug in the software of a camera manufacturer with a customization of Wordpress core. It is a default setting of the image description metadata field of the EXIF, that can not be changed in the camera settings of Olympus cameras. WordPress is working correctly and puts the image description in the appropriate field.

I own an E-M1 myself and know about that issue, since I shot my first pics with it. But instead of expecting any software I use should fix this for me, I correct the EXIFs by myself in my image processing workflow. And I strongly believe that's the right way to handle this.

BTW: has anyone got in touch with Olympus about that?

#11 @swissspidy
7 years ago

  • Keywords needs-unit-tests needs-patch added; needs-refresh 2nd-opinion removed

I'm a bit on the fence. I tend to agree that this is a rare situation as it only applies to older Olympus camera models. 32378.patch might be better put in a plugin, but people would probably not even know that there's a plugin to fix this and blame WordPress for it. So why not make lives easier when we can do so easily? Of course it would be helpful if other cameras do the same and we can have some sort of blacklist to work with.

Anyway, for this to move forward, a refreshed patch with some tests using the photos uploaded to this ticket is needed.

#12 follow-up: @crabsandwich
7 years ago


I am by no means a WP developer and don't really understand if this has been fixed by a patch or not, but i wanted to add that this is not just a problem with old Olympus cameras. I have a relatively new camera (2016) and i still have this problem.

If this is not going to be added to WP, is it not possible to halt the over-write by the exif data by creating a script or even a plugin....

Any more WP orientated input on this topic would be much appreciated or would @tpnotes please aid me in batch editing exif's in photoshop for this purpose.

Thank you

#13 @crabsandwich
7 years ago

After submitting the last reply i found the following plugin

Works a treat on my Olympus photos

7 years ago

add generalized system for replacing unwanted default image metadata

#14 @dmsnell
7 years ago

The latest patch ( I just uploaded makes some big changes to the scope of this ticket: in addition to simply replacing the Olympus camera defaults it provides a generalized system for replacing unwanted image metadata, as requested by @wonderboymusic.

The new patch is much more complicated than the original one and I could just as easily see the extensibility coming in from adding more filters on wp_read_image_metadata instead of this new system. However, the new image_metadata_substitute_defaults() does provide a more straight-forward way of adding new substitutions that should hopefully be safer and easier for people to find and use.

There are no tests on this patch yet and I haven't even tested the code to see if it works. My goal in submitting it is to garner feedback on the implementation. The heart of the filter is testable outside of the WordPress environment and it should be trivial to add tests once we know if that's what we want to build.

I agree with what @swissspidy brought up: users shouldn't need to know that they have to look for a plugin in order to fix this and the behavior without a fix is likely to look like we misread the image data. My argument in favor of "fixing" this is that the information provided by default doesn't semantically match the EXIF fields it's stored in.

7 years ago

oops - fix: spaces -> tabs

#15 @swissspidy
7 years ago

  • Keywords has-patch added; needs-patch removed

That's pretty neat, thanks @dmsnell!

#16 in reply to: ↑ 12 @tpnotes
7 years ago

Replying to crabsandwich:

Any more WP orientated input on this topic would be much appreciated or would @tpnotes please aid me in batch editing exif's in photoshop for this purpose.

Access your images with Bridge, highlight any image you want und just delete the according entry in the metadata panel in the lower right.

If you use Lightroom for managing your images, you can define an import preset, which does it on import automatically.

#17 @tpnotes
7 years ago

I still argue against fiddling around with EXIF data with WordPress. It is not WordPress Business. I as a photographer want to have total control, which metadata are going with my images online and do not want any system to decide on its own, if those metadata are "appropriate".

6 years ago

#18 @mattday
6 years ago

Just wondering what needs to happen now for this to make it into core.

I appreciate it may be a non-issue for some professional photographers, although I believe it is a real annoyance for average users. Some people just want take a JPG file off their camera and upload it to their site. So it would be splendid if the title and caption were not automatically set to 'OLYMPUS DIGITAL CAMERA'.

The last patch by @dmsnell looks good to me. It is very generic and can still be applied without modification to 4.9.7. However, it did not work for me. In debugging, I found it was necessary to tweak the pattern strings slightly for the preg_match. I then tested on a number of images from different Olympus and non-Olympus cameras.

One thing I found through the testing was that taking the file name directly from the EXIF field is not ideal. The resulting names are inconsistent with images uploaded from other cameras, because they include the ".jpg" extension at the end. I further modified the patch to address this and have attached an updated version.

#19 @dmsnell
5 years ago

Thanks for that update @mattday.

@tpnotes as a photographer I think it would be surprising to intentionally store OLYMPUS DIGITAL CAMERA as the title for any image I store. The purpose here isn't to determine what "appropriate" is but rather to clean up bits that are obviously wrong and otherwise out of our control.

That is, it feels like this is solving a felt need by many people while posing a hypothetical problem for a subset. Do you feel differently?

Not sure how to make this move forward…

#20 @bjones9942
5 years ago

What would be ideal, in my opinion, would be options on a setup screen that would allow the user to select various EXIF fields, {Filename}, {Custom Text}, or {None}; for Title, Alternative Text, Caption, and Description. Defaults could be set to the current usage. This would give the most flexibility and would retain the EXIF information.

Last edited 5 years ago by bjones9942 (previous) (diff)

#21 @tpnotes
5 years ago

  • Type changed from defect (bug) to feature request

In my opinion it is the responsibility of the content creator to know what she/he is uploading to the internet and therefore manage all metadata actively.

I still believe that Wordpress Core should not mess with metadata during the upload of images in any way without letting the user be fully aware about it and give her/him a chance to interfere. And - hard coding specific phrases is never a good idea. Someone will stumble over it in the future. That's Murphy.

From the perspective of reducing complexity in code, which has to be maintained and supported: Olympus has a global market share of 2.8% according to a recent post on PetaPixel ( How many Olympus camera users are not actively manage their image metadata AND using Wordpress for a more or less personal use (cite of @mattday: "Some people just want take a JPG file off their camera and upload it to their site")? Is that issue really affecting so many users, that it is worth to be addressed, maintained and supported within the core of a software which is used by 25% of all websites?

As I re-read the entry - beside my own strong opinion about metadata - I understand, that someone might not want to handle every single image. I really like the idea from @bjones9942 to give users more options directly while uploading an image. The current process with uploading then actively open the image in the media section and then editing metadata is clunky and it might be forgotten easily. So, enabling and encouraging users to manage their metadata just at the moment, when they are already handling their images, sounds great.

While thinking about how such a feature might be implemented I had another idea:
How about a feature in the settings section for media where a user can manually enter one or more terms for defined metadata fields (e.g. title, caption, keywords...) which should be deleted on import? And/Or an option to clear defined metadata fields on upload? And/Or just a simple option to strip all metadata on upload except the copyright?

I have changed the type of the issue to "feature request", since the issue seems not to be a bug in the Wordpress core. Just as a suggestion.

#22 @dmsnell
5 years ago

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

I propose that we close this issue as wontfix because we've considered it for four years and have been unable to come up with a solution. in all likelihood my patch will never be modified to replace other EXIF tags and this is likely just incidental to one behavior on the Olympus cameras that won't be a running issue into the future.

If we do want to fix this then I propose we create a new ticket that hard-codes the Olympus behavior and makes for a tiny simple patch, even if it leaves such a tombstone of hard-coded exception in the image handling code forever.

@vparkhere and others, do we feel like this continues to be problematic enough that it warrants the fix?

@tpnotes one thing that can be overlooked here is that while certain professional and enthusiast photographers will be choosing their data intentionally (though who would actually name their file OLYMPUS DIGITAL CAMERA - I think that's a non-point) it's actually something people have been confused about and raised as an issue that unintentionally their photos got this strange name. in other words, the system seems to making it hard for people who are less aware to know "what she/he is uploading" and this patch is an attempt to address that failure.

#23 @desrosj
5 years ago

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