我想去wp_attachment_metadata
以我自己的方式。我想区分大小(缩略图、大、中、小)。数据库上的元值如下所示:
a:5:{s:5:"width";i:660;s:6:"height";i:320;s:4:"file";s:39:"2013/07/debut
-busana-muslim-new-yor.jpg";s:5:"sizes";a:2:{s:9:"thumbnail";a:4:{s:4:"f
ile";s:39:"debut-busana-muslim-new-yor-150x150.jpg";s:5:"width";i:150;s:
6:"height";i:150;s:9:"mime-type";s:10:"image/jpeg";}s:6:"medium";a:4:{s:
4:"file";s:39:"debut-busana-muslim-new-yor-300x145.jpg";s:5:"width";i:30
0;s:6:"height";i:145;s:9:"mime-type";s:10:"image/jpeg";}}s:10:"image_met
a";a:10:{s:8:"aperture";i:0;s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:
"caption";s:0:"";s:17:"created_timestamp";i:0;s:9:"copyright";s:0:"";s:1
2:"focal_length";i:0;s:3:"iso";i:0;s:13:"shutter_speed";i:0;s:5:"title";
s:0:"";}}
嗯,我卡住了。我不知道如何分离那个数组。任何人都知道如何分离该数组,以便我可以获得图像的大小和URL。