Title: Read attachment data
Last modified: August 19, 2016

---

# Read attachment data

 *  [devfolio](https://wordpress.org/support/users/devfolio/)
 * (@devfolio)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/read-attachment-data/)
 * If i read the data out of the media library it returns a encrytion:
 * > `a:6:{s:5:"width";s:4:"1680";s:6:"height";s:4:"1050";s:14:"hwstring_small";
   > s:23:"height='80' width='128'";s:4:"file";s:17:"2009/12/blaba.jpg";s:5:"sizes";
   > a:3:{s:9:"thumbnail";a:3:{s:4:"file";s:17:"blaba-150x150.jpg";s:5:"width";s:
   > 3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:17:"blaba-300x187.
   > jpg";s:5:"width";s:3:"300";s:6:"height";s:3:"187";}s:5:"large";a:3:{s:4:"file";
   > s:18:"blaba-1024x640.jpg";s:5:"width";s:4:"1024";s:6:"height";s:3:"640";}}s:
   > 10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";
   > s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";
   > s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:
   > 1:"0";s:5:"title";s:0:"";}}`
 * How can i decode this, i thought i could be done with json_decode, but that didnt
   do the job?
 * Is it also possible to check the image if its used in a post ?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [bartjan](https://wordpress.org/support/users/bartjan/)
 * (@bartjan)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/read-attachment-data/#post-1305093)
 * I would like to know this aswell. Does anyone have an awnser?
 *  Thread Starter [devfolio](https://wordpress.org/support/users/devfolio/)
 * (@devfolio)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/read-attachment-data/#post-1305525)
 * Anyone… **please?**
 *  Thread Starter [devfolio](https://wordpress.org/support/users/devfolio/)
 * (@devfolio)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/read-attachment-data/#post-1305534)
 * bump again!
 *  [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * (@jfarthing84)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/read-attachment-data/#post-1305569)
 * You need to use PHP’s `unserialize()` function.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Read attachment data’ is closed to new replies.

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [media library](https://wordpress.org/support/topic-tag/media-library/)

 * 4 replies
 * 3 participants
 * Last reply from: [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/read-attachment-data/#post-1305569)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
