Your best bet here would be to use jQuery to grab any link that links to an image and tell it to use fanceybox.
jQuery(document).ready(function($){
$('a[href$="jpg"], a[href$="png"], a[href$="jpeg"]').fancybox();
});
If you want this to work just for your post content areas use this:
$('.post-content a[href$="jpg"], .post-content a[href$="png"], .post-content a[href$="jpeg"]').fancybox();
You will need to replace .post-content with whatever HTML parent element wraps the content area.
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
- 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 can I change the to for lazyload wp smilies
- 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?
- get_post_gallery with Gutenberg
- Saving the pre-sanitized filename of an attachment as the Title or Caption
- Add aditional class to get_avatar when showing image
- How to grab first image attached to post and display in RSS feed?
- How to add a link in a image’s caption?
- Displaying a featured image (only img url) as the img src?
- Image size filtering in Media uploader according to custom post type
- Adjusting caption below single post image
- Include captions
- Resizing image into thumbnail, small, medium and large options greyed out
- Add multiple images to author profile page
- Is there a plugin or simple way to add a multiple images metabox to a post?
- Show media url immediately after upload in media uploader
- Publish/Update post is changing image links from file url to post url
- How to open default wp image editor screen dynamically?
- update_post_meta attachment_image_alt description for Gutenberg
- Add select input with pre defined classes to insert image screen?
- Is there a way to change all already uploaded images which are PNG and convert them to JPG?
- Auto delete attachments that are older than x days
- Image increasing kb on resize
- attach image from library to post with wp_insert_attachment
- Bulk-add featured images in posts with no featured image
- Media gallery images url instead of ID on WP API Response
- How to get image from media library with URL [duplicate]
- Custom image uploader without widgets
- How to upload and style svg logo?
- How to change the catalog product image size by product id?
- are unattached media files a problem?
- Disable image rename on upload
- Development environment and “production” environment domains
- Why am I getting and error from wp_get_attachment_image_src?
- Upload images – Theme options
- Product Images Making a Column
- What’s are some best practices for responsive images (e.g. for section headers)?
- Recreate the upload folder from a website without having access to the backend/cpanel/filezilla directly from the website
- how automatically show the image title before the image caption/description in a wordpress gallery?
- Hot Linked Own Images
- Change wordpress default upload path to another domain
- Alt attribute is not showing while the value is given in Media
- Alternative image sizes are too large
- How do i replace the title attribute of img tag with the image caption
- Create slider option in editor
- Assign one featured image to multiple posts?
- Why are my ‘medium’ images the wrong size
- How can I hide previous_image_link() on first attachment page?
- Theme files and imagesnot loading on a mobile device
- Guaranteed Image Sizes
- How to change the alignment of the background image for small screen (tablet/smartphone etc.)
- get_theme_file_uri function not showing background image inside data-setbg in html