Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $meta = wp_get_attachment_metadata($imageid);
- if( array_key_exists("full", $meta["sizes"]) ) {
- $imagepath = wp_get_attachment_image_src($imageid,'full')
- } else {
- // Fallback to the original file name
- if( array_key_exists("file", $meta) )
- $imagepath = 'wp-content/uploads/' . $meta["file"];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement