How to get the cropped image from media library?
Get the attachment ID for the image, then get the post meta field _wp_attachment_metadata for it. This is a serialized array. The field sizes in that array contains all available image sizes. Pseudo-code: $sizes = array(); $attachment_url=”http://examle.com/wp-content-uploads/foo.png”; $attachment_dir = dirname( $attachment_url ); $attachment_id = get_attachment_id( $attachment_url ); $attachment_meta = get_post_meta( $attachment_id, ‘_wp_attachment_metadata’, TRUE ); $sizes[] … Read more