• Resolved airdrummer

    (@airdrummer)


    i see from inspection of user export that the “image” field type is stored as an integer…i assume that this is the attachment_id, so i assume will this work, no?

    $imgid = get_user_meta( $user->ID, 'field-slug'));
    $imgurl = wp_get_attachment_image_url(intval($imgid));

    • This topic was modified 6 months, 1 week ago by airdrummer.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    Yes – image fields are stored by post ID for the attachment.

    Thread Starter airdrummer

    (@airdrummer)

    thanx, i just need to check for !empty($imgurl)…i was misled by wp_get_attachment_image_url dox:

    Return string|false Attachment URL or false if no image is available.

    it actually returns an empty string-\ gottaluv php-/

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

The topic ‘“image” field type retrieval’ is closed to new replies.