When is used, it calls the original image file source.
It it possible to create a shortcode filter that links to a specific size, like:
or
(referring to an additional image size created with add_image_size()
in functions.php.)
When is used, it calls the original image file source.
It it possible to create a shortcode filter that links to a specific size, like:
or
(referring to an additional image size created with add_image_size()
in functions.php.)
You must be logged in to post a comment.
I found something very close that works here:
http://oikos.org.uk/2011/09/tech-notes-using-resized-images-in-wordpress-galleries-and-lightboxes/
Short of de-registering the built in shortcode tag, copying the function and re-registering it with some modifications you could filter on
wp_get_attachment_link
. The problem is this affects everywhere that function is used.Saying that it might not be such a bad thing:
This will override any links generated to the original size file on the front end with a link to the size you specify in the second argument in
wp_get_attachment_image_src()
.