Create a new shortcode, e.g. my_gallery. You can copy the code in wp-includes/media.php. Look for the code staring with add_shortcode('gallery', 'gallery_shortcode'); and then the actual
function. Rename / modify as needed. The actual img link is within
the $link variable
Use something like this (untested), which should work but might
strip-out all width/height from any link.
I can think of a couple of options:
Create a new shortcode, e.g. my_gallery. You can copy the code in
wp-includes/media.php
. Look for the code staring withadd_shortcode('gallery', 'gallery_shortcode');
and then the actualfunction. Rename / modify as needed. The actual img link is within
the
$link
variableUse something like this (untested), which should work but might
strip-out all width/height from any link.
_
if you set image size in function.php as a “gallery”
you can remove width and height of specific image size such as “gallery”: