As said in this page, wp_get_attachment_image_src()
only accepts built-in sizes such as thumbnail, medium, large or full.
How do you get the same return value with custom sizes you add with add_image_sizes()
?
As said in this page, wp_get_attachment_image_src()
only accepts built-in sizes such as thumbnail, medium, large or full.
How do you get the same return value with custom sizes you add with add_image_sizes()
?
You must be logged in to post a comment.
You are misreading the Codex.
wp_get_attachment_image_src()
works just fine with custom image sizes.Proof of concept:
Add an image to the Library, then…
You will notice that the image returned is (an appromixation of) 300×9999– that is 300 wide by whatever height scales correctly.