Categories
Code WordPress

Get medium image size in WordPress

This is for everyone who’s been trying to find out how to get the medium image size of a post attachment in WordPress: You’ve got to send the function the ID you’re trying to get the medium images for. $medium = wp_get_attachment_image_src($picture->ID, ‘medium’, false); $med_url = $medium[0]; $med_width = $medium[1]; $med_height = $medium[2]; There are […]