Returns the URL to an image resized and cropped to the given dimensions.
You can use this image URL directly — it’s cached and such by our servers. Please use this function to generate the URL rather than doing it yourself as this function uses staticize_subdomain() makes it serve off our CDN network.
Somewhat contrary to the function’s name, it can be used for ANY image URL, hosted by us or not. So even though it says “remote”, you can use it for attachments hosted by us, etc.
Parameters
Name | Type | Description |
---|---|---|
$url | string | The raw URL to the image (URLs that redirect are currently not supported with the exception of http://foobar.wordpress.com/files/ type URLs) |
$width | int | The desired width of the final image |
$height | int | The desired height of the final image |
$escape | bool | Optional. If true (the default), the URL will be run through esc_url(). Set this to false if you need the raw URL. |
Return Value
string