Ad Reactor
Ad Reactor

Reputation: 85

How to get EXIF data of post images in WordPress

I understand that the EXIF data extracted from uploaded images are stored in the WordPress database, but i am not finding the proper way to find them or get them in a post for instance. I was looking around on web but all solutions found didn't work.

Do you know an efficient way to get the EXIF data of a picture from post? I don't mind if is a php or jQuery solution as long it does the job.

Thanks for your time.

LATER EDIT: actually i found the reason for my problem. I managed to call the wp_get_attachment_metadata but except the width and height of image, i receive zero for camera, aperture, ISO, focal lenght, shutter speed etc. The call is something like $imgmeta['image_meta']['camera']

is there something i am missing?

LATER LATER EDIT: Found the issue. server extension php_exif wasn't enabled. thanks for your time

Upvotes: 3

Views: 4415

Answers (2)

Hamster28
Hamster28

Reputation: 11

You could install the wordpress plugin "HK EXIF tags", which just adds one line below each image with the EXIF information.

Upvotes: 1

Mihai Iorga
Mihai Iorga

Reputation: 39704

you can use EXIF Read Data from php.net. Folow first example and you should be able to extract whatever you want ...

EDIT: or you can use jQuery EXIF EDIT 2: for jQuery you must use same domain as the Same Origin Policy applies to EXIF reader as it uses HTTP Requests

Upvotes: 2

Related Questions