The ‘img’ tag is built via the theme code for display on the page. So, you would have to modify the theme code to add to the img tag.
Note that modifying theme code directly is not generally advised, as a theme update will overwrite your changes. “Child” themes are best used for this modification.
Related Posts:
- Creating a photo gallery in WordPress [closed]
- How can I alter the [gallery] markup?
- Make a really simple gallery structure
- Best approach when modifying the Media Manager
- How to show description under an inserted image?
- First three images in post excerpt
- Add option to “Gallery Settings” section
- How I can get image description/title/alt for gallery image?
- WP_Editor – Remove TinyMCE Toolbars
- Define size for `get_post_gallery_images`, they seem to have been resized to 150×150
- Proper Way to Remove Thumbnail Links In Gallery
- Disable Linked Gallery Images If Mobile Browser
- Possible to add same caption to all photos in a gallery?
- How to Add a Custom Colum on Thickbox Media Gallery Tab?
- WordPress 3.5 Gallery Menu Order not set?
- How to get post attachments in gallery post format template
- NextGen – Display Image Count Per Gallery
- have WP Gallery display the title instead of caption
- Changing Gallery images size?
- How to get ID of images used in gallery?
- Add data attribute to a gallery link?
- How can I show these pictures in two columns in my page?
- What is a good way to implement photo galleries on WordPress?
- Display latest 10 galleries
- Gallery set to “Media file”, showing as attachment page
- Gallery Only Displaying One Thumbnail
- WordPress grab first image from gallery
- How can I create a gallery showing Ken Burns effect, when mouse hovers over images? [closed]
- Set default number of columns in gallery
- ACF gallery hook?
- Get attachments but only from post gallery?
- WordPress show Gallery Title and Captions
- In which version of WordPress was the new gallery shortcode implemented?
- Fancybox not working. why?
- Gallery Image Numbers?
- Upload photos to WordPress via ftp w/ [gallery] shortcode?
- How do I create a gallery page?
- NextGen Gallery Slideshow Positioning Issue
- Install Gallery 3 in Subdirectory of WordPress
- Can I have the same image in multiple NextGen galleries? [closed]
- Hide Gallery from the_conent
- Inside text editor my preview gallery images are in full size
- How to run custom JavaScript code on gallery attachment image selection
- How do I export WordPress galleries?
- Lightbox Effect Not Working
- How to use the WP export and get images that are contained in a posts gallery
- How to add a list of all galleries to my sidebar?
- Gallery Shortcode Showing IDs
- Can’t get the columns of galleries when the user set the column number to 3 if there are 2 galleries?
- How to have Tiled Galleries like in WordPress.com?
- Optimizing wp_get_attachment_image_src
- Get gallery images from page ID
- WordPress Gallery Thumbnail images look blurry
- How to change gallery grid from 4 columns to 3 columns? [closed]
- Possibilities for customising the standard wordpress gallery?
- Gallery order specified by shortcodes is ignored in gallery function
- How to display some of images from media library?
- How to add a div around the default gallery output
- Get the a specific image from the post gallery linked to post_id
- Gallery – custom html for inserting images
- How do I test whether [gallery] is empty?
- making wordpress gallery responsive
- Images hidden from wordpress gallery
- How to make in wordpress a gallery with 3 colums to 1 on mobile devices responsive?
- Multiple WordPress Standard Galleries on a page stop images being displayed from other page galleries
- How to automatic specify images in content added to gallery
- Getting gallery instead of single attachment
- Is it possible to make a user-specific gallery?
- Easy Image Gallery – Retrieve Serialized Data
- How to create different gallery-types and let the editor choose between them?
- Output all images from gallery inside a slider
- How to have two galleries side by side?
- WordPress Gallery is not displaying
- Pulling in Column Count in Custom Gallery
- Post gallery loop with thumb and full size
- Error while uploading photos
- How to add more fields to wordpress galleries?
- How do I extract a gallery image from databse?
- Display custom gallery in each wordpress post
- Options for an SEO gallery?
- Add anchor tag on previous_image_link / next_image_link
- gallery image size
- Moved blog – galleries don’t work
- I want to add a gallery to a post but I don’t want it displayed in the content?
- How can I make gallery slideshow width fit to picture width?
- Change the values of numberposts gallery
- Why do all Gallery functions return null for me?
- Displaying only specific galleries using shortcode on a custom page
- JavaScript Errors when Loading NextGEN Gallery [closed]
- Hide the ‘Gallery Settings’ section of the Gallery tab of the media Thickbox
- Generated WYSIWYG gallery with individual gallery_page templates
- Hierarchical gallery
- Gallery image must open up in fancybox directly not post page
- Adding a “More Galleries” Page to the End of an Image.php Gallery
- How can I add hover text to images of a basic gallery on wordpress elementor?
- Multiple Gallery Posts With Sldiers
- Cany anyone name this lightbox? [closed]
- how to show list image in gallery?
- Convert WordPress default grid to carousel
- how to add this type of gallary photo number counter?