Opened 16 months ago

Last modified 6 months ago

#966 assigned defect

iOS 5.0.1 and Wordpress 2.9.3 strips EXIF from photos

Reported by: drsprite Owned by: koke
Priority: major Milestone: Future Release
Component: Media Version: 2.9
Keywords: photos, exif, geotag, gps, geolocation Cc:

Description

Hello,

I have geolocation programmed into my wordpress site and I noticed that when I upload photos, either new or taken from the library, the iOS app strips all the EXIF information from photos uploaded.

Can this be resolved ASAP?

Change History (17)

comment:1 Changed 16 months ago by koke

  • Milestone set to 3.0
  • Owner set to koke
  • Status changed from new to assigned

Photos taken from camera seem to lose the GPS info. Added from library works for me.
Using Quick Photo strips the GPS info for some reason, even from library pictures.

While we work on this, make sure you edit your blog in the app and have geolocation enabled, and use photos from library using the regular editor (not quick photo), if you need the GPS data.

comment:2 Changed 16 months ago by koke

(In [2412]) Add GPS data to camera images on regular post editor. refs #966

comment:3 Changed 16 months ago by koke

I'll leave the Quick Photo fix for 3.0 since it's going to need refactoring anyway, so it uses the same code as PostMediaViewController?

comment:4 Changed 16 months ago by drsprite

Thank you for the update. I just tried your suggestion, and it seems to still remove the GPS from the photo's EXIF.

I tried:

Take a new photo
Edit my blog to make sure Geolocation is enabled. It was. Hit save anyways.
Create a new blog post using the icon in the top right.
Selected a photo from the library
Clicked publish.

When I checked my post, my geolocation was missing. When I checked the uploaded photo against an EXIF verifyer (http://regex.info/exif.cgi) it also showed no GPS data. When I check the REAL photo against that site, it shows GPS.

Any ideas why your suggestion isn't working?

Thanks again

comment:5 Changed 16 months ago by koke

Can you post here the image URL? Where is your blog hosted? Do you have a different blog you can try?

Just to rule it out:

  • Edit blog and disable geolocation, Save
  • Edit blog and enable it again, save.

Either the app thinks the blog doesn't want geolocation, or something is removing it.

comment:6 follow-up: Changed 16 months ago by drsprite

I'm in the process of building a new website, so as of right now everything is on my temporary dev server.

For what it's worth, I initially didn't enable geolocation when I added this blog. I have enabled it for my recent round of testing (prior to this report).

I will try again with a new post of an existing image. Here's my steps:

-Edit blog, disable geolocation and save :: Done.
-Edit blog, enable geolocation and save :: Done.
-Open blog, add new post using top right Compose icon
-Title Test, Photo from library attached, hit Publish

Went to my development website: http://basecamp.drsprite.com and see that my post (this one of a telephone photo) has no meta information for location. Verified by http://regex.info/exif.cgi?imgurl=http%3A%2F%2Fbasecamp.drsprite.com%2Fwp-content%2Fuploads%2F2012%2F01%2F20120125-131320.jpg

If I take this same photo, copy it to my PC and FTP it to my site, then verify it against the EXIF website, you'll see the GPS information. http://regex.info/exif.cgi?dummy=on&imgurl=http%3A%2F%2Fbasecamp.drsprite.com%2Fimages%2Ftemp%2FWP-Support.jpg

Further, I am using a plugin that when a photo is uploaded through WP's normal media uploader, it grabs the Meta information from the photo and saves it to MySQL. Does the iOS app upload photos in the same manner where the plugin should get activated?

The plugin is using this filter when it is called upon during image upload:
add_filter('wp_read_image_metadata', 'add_geo_exif',,3);

I suspect the iOS app is uploading images in the same fashion as the normal website does, it's just that the GPS data is being erased on the iOS app (as evident by the EXIF website data).

Thanks again

comment:7 in reply to: ↑ 6 Changed 16 months ago by daniloercoli

I will try again with a new post of an existing image. Here's my steps:

-Edit blog, disable geolocation and save :: Done.
-Edit blog, enable geolocation and save :: Done.
-Open blog, add new post using top right Compose icon
-Title Test, Photo from library attached, hit Publish

I uploaded some pictures on my self-hosted blog by following the steps you published above and EXIF data are still there:
Full size image: http://regex.info/exif.cgi?dummy=on&imgurl=http%3A%2F%2Fwww.eritreo.it%2Fwp305%2Fwp-content%2Fuploads%2F2012%2F01%2F20120126-102029.jpg

Small size image: http://regex.info/exif.cgi?dummy=on&imgurl=http%3A%2F%2Fwww.eritreo.it%2Fwp305%2Fwp-content%2Fuploads%2F2012%2F01%2F20120126-102211.jpg

( iOS 5.0.1 - WordPress? for iOS 2.9.3 - WordPress? 3.3.1 )

comment:8 Changed 16 months ago by drsprite

I tried it again and it keeps failing for me. Not sure why

comment:9 follow-up: Changed 15 months ago by drsprite

Updated today to 2.9.4 and the geotagging EXIF is still missing, even though release notes says its resolved.

I don't see the lat/long in the _wp_attachment_metadata table. Does it store it somewhere else, or is the functionality still not quite ready for this last release?

Here's a photo I uploaded using the quick photo utility, and verified that GPS data is missing.

http://regex.info/exif.cgi?imgurl=http%3A%2F%2Fbasecamp.drsprite.com%2Fwp-content%2Fuploads%2F2012%2F02%2F20120216-222038.jpg

Thanks again for the help

comment:10 in reply to: ↑ 9 Changed 15 months ago by koke

Replying to drsprite:

Updated today to 2.9.4 and the geotagging EXIF is still missing, even though release notes says its resolved.

See comment #3, Quick Photo is not fixed yet. If you upload using the regular editor, does it have the proper GPS data?

comment:11 Changed 15 months ago by koke

  • Milestone changed from 3.0 to 2.10

comment:12 Changed 15 months ago by drsprite

I understand the Quick Photo is not fixed yet. I was uploading this image using the regular editor, and it is still not working.

As shown in my link in comment #10, the photo uploaded does not contain any GPS geocode data when uploaded using the full editor.

comment:13 Changed 13 months ago by koke

  • Milestone changed from 3.0 to 3.1

comment:14 Changed 11 months ago by koke

  • Milestone changed from 3.1 to 3.2

comment:15 Changed 8 months ago by daniloercoli

I suspect the iOS app is uploading images in the same fashion as the normal website does, it's just that the GPS data is being erased on the iOS app (as evident by the EXIF website data).

Make sure 'Location Services' are enabled for the WordPress? app, otherwise the app will upload pictures without GPS data.

( I've some pictures with GPS data in photo library. If 'Location Services' are disabled the WordPress? app can't access GPS data, and the pictures will be uploaded without location information. When 'Location Services' are ON the app can access GPS data, and the photo will be uploaded with GPS data in it.

Last edited 8 months ago by daniloercoli (previous) (diff)

comment:16 Changed 8 months ago by daniloercoli

  • Milestone changed from 3.2 to 3.3

As per IRC discussion, a one-time alert when geolocation is enabled but location services are disabled is probably the better solution for this issue. In post editor, instead of the location icon, we may show a warning symbol /!\, and tapping on it gives more info.

Note: How to read Location Services authorization:

  • Starting with 4.2 -> [CLLocationManager authorizationStatus]
  • Since 4.0 -> [CLLocationManager locationServicesEnabled]

See: http://ios.trac.wordpress.org/ticket/1372

comment:17 Changed 6 months ago by koke

  • Milestone changed from 3.3 to Future Release
Note: See TracTickets for help on using tickets.