You have to use the same quotes around the src
attribute as WordPress uses. So filter the URL like this:
add_filter( 'smilies_src', function( $src ) {
return ""https://wordpress.stackexchange.com/questions/116078/data-original="$src";
});
And while I was on it, I noticed the doc block for the function translate_smiley()
is wrong, so I have written a small patch. 🙂
Related Posts:
- Filter to remove image dimension attributes?
- Change WordPress image URLs via filter
- Always use for post images
- Change html structure of all img tags in WordPress
- Default Image Link Removal
- Remove title attribute from images
- hook into completed image upload filter
- Need help building a filter to edit the output of “image_send_to_editor”
- Filter Media Library by author or post_parent
- Preview Image Path in Admin Section
- How to display a shortcode caption somewhere other than the_content
- Alter image output in content
- How can I remove the image attachment ALT field?
- add data-attribute to all images inside the_content()
- Filter to modify post_title after image upload?
- Change html structure of all img tags in WordPress
- Disable wordpress image sizes generation
- Extend core block attributes in post content
- What’s the proper way to use the get_image_tag filter?
- Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?
- How to get image ID to use inside wp_read_image_metadata()?
- Is there any action/filter hook to use when an image gets edited in the editor?
- How to create ‘Local’ filters for WordPress srcset sizes in template parts?
- How to add custom classes to figure element only if image has caption?
- Change align classes for images
- How to filter the image embed code based on link type
- Add custom text in the media library image meta area
- WP 5.3 Removing Default WordPress Image Sizes
- Filter for post_thumbnail: link to small src and add data-attribute [duplicate]
- Remove Image Sizes in Media Settings Page
- How can I use wp_save_image_editor_file filter?
- How to stop WordPress from completely overriding my tags in my templates?
- Is it possible to enable the ‘Link To’ field under ‘Attachment Display Settings’ for a Featured Image?
- Prevent WP from wrapping html in caption shortcode after ‘image_send_editor’ filter is applied
- How to display a warning when an uploaded image is too small?
- How to change an image source when rendering on frontend?
- How to change Gallery image url in product page ? In function.php?
- How to get title of images in post content
- How to generate alt attributes with php / filters?
- How to trigger “wp_handle_upload_prefilter” filter when uploading an image programatically?
- js alert in add_filter function for image_send_to_editor
- Dinamically modifying attributes of images on posts
- How to attach post ID to image links in WordPress tinymce editor
- image_send_to_editor filter – Unwanted paragraphs and line breaks
- How might one programmatically set the link for all images in all posts?
- Image filter works on attachement pages but not posts. I can’t get the image ID
- Surround uploaded image link with div
- Removing image dimensions from `the_content`
- Rename uploads filenames to POST-ID on upload
- I tried to move the featured image below the paragraphs but now it is displaying twice
- How to add a link to media file for every image inserted in content?
- How to modify an image block in Gutenberg WordPress 5?
- Cropped featured image replaces original image in gallery
- Prevent image upload unless exact size
- Use Media upload in custom widget on wordpress 3.5
- Associate an existing image with a post
- How to remove title attribute from gallery links and images
- How to upload image without post ID using the new media uploader?
- Display different header images based on current page
- Set a background color per image added to a post
- add_image_size() to crop images into squares?
- How Do I Delete All The Images from WordPress
- Consolidating two websites into one, but migrated images not appearing in Image Library
- Is my code is right to make image shortcode
- How to remove p tags around img and iframe tags in the acf wysiwyg field
- image in my post disappeared after I upload website to remote server
- Pull images from the gallery
- Isolating images in uploads not used/recognised by WordPress
- How to configure sub-domain for images on Debian Apache VPS?
- Is there any way to Integrate WordPress with Imgur for Image Hosting
- Add custom metabox to media library images
- Autosort uploads in galleries by filename
- How to display original unmodified thumbnail
- One picture belonging different galleries?
- How to display image in mail header using wp_mail()
- Redirect Image Url to a page via htaccess
- How does wordpress name resized image copies?
- Media Editor uppercase extensions to lowercase
- How to post images on my blog with a pre-defined border
- Output posts attached images as thumbnails linked to full-size with lightbox class
- my featured image of wordpress are not showing in the front end though image are uploaded in media library
- Images getting smashed
- Unset image sizes before images are uploaded
- Wrap post images with a link, not figure (image_send_to_editor doesn’t work)
- An error has occurred during the upload process in wordpress 5.3.2
- get_the_post_thumbnail() title and alt attributes not displaying
- What is the best way to host a site with many images without it being too slow?
- Load only imagens resized in custom page
- How to see previous –next image option in the theme?
- Getting the Select and Crop Functionality Using Custom Fields
- Need help making my homepage blog image smaller than my post image
- How do I display image files as links?
- wp_get_attachment_image_src() does not return what I want
- 3.5.x Theme Customize: Handling Custom Control Requests
- Wrap a post image with a div if it doesn’t have a caption
- Adding different classes to different images depending on size for fine control of image layout in posts
- How to display image ALT under image?
- Faster image upload on mobile [closed]
- Uncaught Error: Call to undefined function file_is_valid_image()
- Remove one srcset entry from wp_get_attachment_image