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
- Can I attach image to post without adding it to post?
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Navigate with keyboard in Gallery shortcode
- Insert an image into a post by API
- 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
- Dynamically add titles to post images if they are empty
- Separate attachment images from post loop
- How to display a shortcode caption somewhere other than the_content
- copy attachment title to description and alt text
- Allowing post attachments without allowing to insert in text
- Rename attachments during upload
- How to link Gutenberg Gallery images To Media file automatically?
- Regex to turn embedded images in to attachments
- get attributes/part of the gallery shortcode
- Regenerate missing _wp_attachment_metadata
- Make alt text required when setting a featured image
- 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
- Is there a way to get attachment data?
- How to change image url?
- Custom page template to display all image attachments
- get the image of the post
- media_sideload_image with rewritten urls?
- WooCommerce-like featured gallery
- Override img class in gallery
- Pull Random Attachments With Pagination
- Extracting gallery images in WordPress 3.5 on index.php
- Out of memory error reporting
- How can I attach hotlinked images in posts/pages within the same server?
- Multiple images in one attachment page
- WordPress Image Attachment using remote image
- How to use photo in multiple posts?
- attachment.php code or tutorial
- Turn off image captions in gallery view?
- Unyson Framework doesn’t show gallery images
- Images attached to posts from library link to 404 error page
- Help to upload post attachments from Ajax
- Replacing the content of an image attachment using API
- How can I display an image description, from an image gallery?
- Gallery with thumbnail carousel
- Ways to show multiple, separate galleries per post?
- convert post title to image
- How to get the Gallery form/section just like in Gutenberg block?
- How do you import images from a URL in your post?
- Get all image IDs from the Media Library
- Get images attached to a specific page
- Allow users to contribute images to a post
- How to get the title of the random images from media library?
- How to test if there are no more previous or next image on attachment page?
- limit number of images shown from gallery
- What is the plugin to import image from URL?
- photo gallery implementation like tmz
- How do I display the featured image from an image gallery using a reference in code? (example within)
- How to replace post image url before posting using api?
- How to enlarge thumbnail on mouseover?
- attach several images to post + gallery
- get_post_gallery with Gutenberg
- Implementing a modal(lightbox) for all images in all post-gallery posts
- Link to products with the same image title (woocommerce)
- How to echo images Urls from a wordpress post, that are relally in the post
- SQL: How to find all attachments that are not used in any posts/pages/custom_post_types
- Allow users to upload attachments to certain posts
- get_post_gallery with Gutenberg
- How to automatically load an image inside the post, since it is present in uploads folder
- Get “Image CSS Class” value from the Advanced Options section
- Uploaded images not showing properly using wordpress
- How can I add an “Attach image to this post/page” link on the Add Media lightbox?
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Create a custom attachment thumbnail for quick page load
- Breadcrumbs for Single Image page
- Multiple gallery thumnbnails on one page
- Putting the title attribute in image tag — Snapshot Theme from Woothemes
- Slider do not add alt attribute. Cant get alt attribute from a media library!
- Upload unnattached image from frontend
- Image attachement management – a philosophical question
- Paginate Gallery [closed]
- Stop Attachment image names from taking top level permalink
- *box for images displayed as a post’s [gallery] [duplicate]
- Getting top Image From the Gallery and printing out a thumbnail with Exact Dimensions
- Images uploaded in customized gallery do not link to media