You can run a filter on image_send_to_editor
, the filter runs inside the get_image_send_to_editor
function which is resposible for sending the link HTML that surrounds images sent to the editor.
The filter can be found in core, in wp-admin/includes/media
and is linked below for quick reference.
core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/media.php
Related Posts:
- Get post attachment images dimension and use in embed code
- How To Retrieve An Image Attachment’s Alt Text?
- getting attachement images src and add classes
- Check if post has attachments (not image)
- Validate alt text for attachments?
- get post attachments of a particular size
- Change image link: wp_get_attachment_link
- Making images from single.php pointing to an attachment .php template
- Applying class to links around self hosted images embedded to posts/pages
- wp_get_attachment_image_src always returns false
- Exact image sizes
- Get the size (size in Kb or MB) of an featured image?
- query attachment images … if no attachments -> get attachments of parent page?
- Edit default image attachment size
- Change code to display image attachment page
- Attachment 0×0 size error [closed]
- Add image attachment to post via coding?
- Removing width and height attributes from wp-get-attachment
- use wp_get_attachment_image() to show attachments
- Adding width and height to wp_get_attachment_image_src
- Get the bare URL for an attachment
- Display attachment resolution size
- How to check if there is image title, caption, description?
- How to remove attachments size attribute [duplicate]
- How to redirect ‘file url’ to ‘post url’ i.e. in attachment.php
- Check what attached image size is used
- How do I get all attachments that are used in the current post, not just the children?
- Clean up images, delete unused image sizes attached to a post type
- Get title of post image is attached to
- Correct attachment size
- Post Gallery list attachments except the one used as post thumbnail
- Get image attachment to a post outside the loop?
- How do I intercept and modify the functionality of wp_get_attachment_image()?
- Unable to get wp_get_attachment_url to show
- Get Attachment Image Class by attachment id
- Possible to add “Even/Odd Classes” to image attachments via wp_get_attachment_image?
- changing the default picture size link url
- Get an image from the media library. Struggling with the code?
- How to view exact image dimensions of a media in Admin view?
- Filter not applied to all image sizes
- wp_get_attachment_image_src calling wrong location
- Get attachment URL from attachment Link in WordPress
- Display setting ‘size’ not available in image settings modal
- Hide Image Container if No Image Attachments
- Incomplete attachment page
- How to retrieve “custom url” from image attachment in wordpress
- Retreive tags from attached post for media on page
- list of attachments: wp_get_attachment_link works, wp_get_attachment_image does not
- What is the most efficient way to retrieve a group of image URL’s from different attachment ID’s of a specific crop size?
- get_image_tag filter not working
- Change attachment inside the_content using filters
- Get the first image from post content (eg.: hotlinked images)
- Get all post attachments except featured image
- How can I bulk delete media and attachments using WP-CLI?
- Disable image attachment links
- Changing attachment urls?
- How can I UN-attach media from a post?
- How do I delete all generated images from my server except those currently used in posts
- Unattaching unlinked images
- get images attached to post
- How to add media from front-end to an existing post?
- Get attachments (get_posts) and WP 3.5 new uploader
- exposing attachment uploading to the front end — delicate
- Change the Permalink for wordpress attachment
- How to get list of paths (not urls) for an image
- Adding Featured Image to Post programatically
- Get an image from url in front end submission form
- Display info from custom fields in all images’ HTML
- How do I delete thousands of unattached images?
- Get post embedded image caption
- Add suffix to filename of uploaded images
- Show prev and next post links for parent post of current image in attachment page?
- Get a Page’s attachments in Gallery order
- Attachment page 404 not found when image is attached to post
- add the post as canonical for attachment page wordpress
- Customizing the attachement page to show rest of all images in a gallery from post
- hook wp_generate_attachment_metadata does not read all the attachments
- Massive photogallery import
- Retrieve Image Attachments Getting Post Thumbnail Image First
- How can I display a link to a post’s (Word doc or pdf) attachment?
- GUID field in wp_posts – relevance for attachments?
- Prevent image from being accessible via url as a post?
- Upload multiple image with media_handle_upload with multiple file field [duplicate]
- get_post orderby not working in plugin
- Delete child post and attachment links to parent post
- Remove attachment from database
- How to get the next and previous image title from attachment or gallery?
- Display Audio Attachment URL
- Output posts attached images as thumbnails linked to full-size with lightbox class
- Custom image size not displaying with wp_get_attachment_image()
- Programmatically Altering Gallery Link and image size?
- Get list of posts from attachment
- wp_get_attachment_metadata is empty
- After I upload a file to library its name converted to dashes
- How to show post attachment image
- Possible to “Attach” images to multiple posts without uploading twice from Add media Section?
- WordPress Attachments vs Post Meta
- open image after clicking on single.php with different stylesheet in wordpress
- How do I get link URL (not file URL or attachment URL) of an attached image [duplicate]
- Attachment page custom title?