I’ve found a solution :
// Remove <img> title attribute in
// http://wordpress.org/support/topic/wp_get_attachment_image_attributes-filter-not-working
function remove_img_title($atts) {
unset($atts['title']);
return $atts;
}
add_filter('wp_get_attachment_image_attributes','remove_img_title', 10, 4);
// remove title attribute from <a> title attribute in
// modified from this post : http://oikos.org.uk/2011/09/tech-notes-using-resized-images-in-wordpress-galleries-and-lightboxes/
function ah_get_attachment_link_filter( $content ) {
$new_content = preg_replace('/title=\'(.*?)\"https://wordpress.stackexchange.com/", '', $content );
return $new_content;
}
add_filter('wp_get_attachment_link', 'ah_get_attachment_link_filter', 10, 4);
Related Posts:
- Prevent WordPress from adding image’ title automatically
- Bulk edit wordpress images alt and title attributes
- Exclude images from “inserted into post” when trying to get attachments
- Customizing the attachement page to show rest of all images in a gallery from post
- One picture belonging different galleries?
- Excluding post thumbnail from the attachment.php when using wordpress gallery
- Can i have 2 separate Galleries on 2 separate pages each go to a DIFFERENT Attachment.php file?
- how automatically show the image title before the image caption/description in a wordpress gallery?
- Show WordPress Image Title Under Custom Portfolio Image
- attachment.php & flexslider—linking thumbnail to specific image
- Show title when inserting single images
- wp_get_attachment_link() add rel attribute if the link points to direct image
- Image Attachments Query Not Working If Post Is Loaded Via Ajax
- Programmatically adding images to media library
- How do I delete all UNUSED images from my uploads directory?
- get attachment title based on attachment id
- Programmatically get images by URL and save in uploads folder
- How to extend the gallery block in Gutenberg?
- how to get original image using wp_get_attachment_image_src
- Can I attach image to post without adding it to post?
- Overide Gallery Default Link to Settings
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- get_post_gallery with Gutenberg
- Auto Add Image Title,Caption,Alt Text,Description while uploading Images in WordPress
- How to have different captions for same image, for galleries?
- wp_get_attachment_image_src and server path
- get_post_gallery_images returns thumbs . I want full size
- How to find attachment by it’s name?
- WP 3.5 and Galleries – how to count images?
- Navigate with keyboard in Gallery shortcode
- Cropped featured image replaces original image in gallery
- How do I delete all generated images from my server except those currently used in posts
- get images from post and make a zip
- Insert an image into a post by API
- Function to call the attachment image from post
- Theme Customiser Image Control
- Change the output for [gallery] shortcode
- How can I hide media library images from general users?
- Making WordPress Gallery (.gallery-item) Responsive?
- How do you modify the HTML output of a Gallery item (using the gallery shortcode)?
- Get attachment ID of author_meta image – Attachment Metadata
- How to include externally hosted images into a gallery block
- Associate an existing image with a post
- Adding HTML within an image title attribute
- Dynamically add titles to post images if they are empty
- Programatically creating image attachments from local URLs and setting featured image
- Excludes posts that don’t have attachments in the_content()
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- How do i upload an image and return the image id?
- Get Attachment ID from URL [duplicate]
- Setting up a gallery with images and a zip download
- Separate attachment images from post loop
- How can I make all gallery images to open in a new window?
- How to display a shortcode caption somewhere other than the_content
- copy attachment title to description and alt text
- The WordPress Gallery, Grabbing The Link and Images?
- Get an image from url in front end submission form
- Open the attachment details modal
- Displaying a featured image (only img url) as the img src?
- How to upload image without post ID using the new media uploader?
- How do I delete thousands of unattached images?
- Allowing post attachments without allowing to insert in text
- How to force WordPress to add new images at the beginning of the gallery?
- Applying class to links around self hosted images embedded to posts/pages
- Rename attachments during upload
- Filter to modify post_title after image upload?
- How to link Gutenberg Gallery images To Media file automatically?
- Regex to turn embedded images in to attachments
- Re-process Images
- Show prev and next post links for parent post of current image in attachment page?
- How to Make WordPress Default gallery responsive on mobile?
- Get a Page’s attachments in Gallery order
- Pulling Post Image Attachments in WordPress 3.9
- get attributes/part of the gallery shortcode
- Link Featured Thumb to Attachment Page, If Possible
- Different captions for the same image in multiple galleries. Edit Image in Gallery locally
- Regenerate missing _wp_attachment_metadata
- Make alt text required when setting a featured image
- Image still linked as attachment to page even though it has been deleted
- Editing built in Gallery shortcode to filter by categories
- Gallery images stored elsewhere (preferably Google Drive)
- WordPress gallery previous/next buttons showing all media library images
- Any way to “combine” galleries or show multiple galleries as one?
- Display one random image, but only if landscape
- get_attachment_id() only get id of first attached image after post update
- Why can I not view image attachment pages?
- Add image attachment to post via coding?
- Is there a way to get attachment data?
- What’s the proper way to use the get_image_tag filter?
- How to change image url?
- Best option for photo/gallery handling?
- Add a new data attribute in tag
- Gallery post images on homepage?
- Custom page template to display all image attachments
- How to create a simple slideshow out of a post image gallery?
- Link to full size image or attachment page in photo theme
- get the image of the post
- add the post as canonical for attachment page wordpress
- How to change the target size of images clicked on in WordPress standard gallery
- Get meta data from image