Try adding this to your functions.php – it will wrap the image in the div you want.
function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) {
return '<div class="post-page-image" id="image-'.$id.'">'.$html.'</div>';
}
add_filter('image_send_to_editor', 'filter_image_send_to_editor', 10, 8);
Related Posts:
- How to extract images of post and pages excluding header and logo image in wordpress?
- How to change ID of an attachment in wp_posts and its related tables correctly?
- Bulk Image Uploader to create new post from each image [closed]
- Get the url of the full sized attachment image using post ID?
- Adding Attachment Display Settings in custom media frame
- Redirect to another page using contact form 7? [closed]
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- Copy/paste local images not working in WordPress
- How to wrap image tag into div for post only?
- How to force regenerate thumbnails in WordPress posts?
- Retrieve post thumbnails
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- Publish Post After Click On A Link
- Enable comments for post with comments meta box removed
- Edit/revise option for authors to suggest improvement to posts [closed]
- Is there an action that is called when a post is restored from the trash?
- plugin for wp_list_categories with posts
- Replace existing pages with new pages, keep menu links
- Saving/Writing/Adding file to upload folder
- Adding “ ” before the last word in multiple defined areas with a plugin
- How to limit 1 image per post on homepage only?
- [Plugin: Posts 2 Posts] How does it work?
- Flickr plugin that will display photos from multiple group pools? [closed]
- How to add new tabs in post.php
- New post notification plugin [closed]
- Regenerate images with automatic ALT and TITLE attributes
- Adding Plugin-specific Fields with wp_insert_post()?
- How can i list random post from multiple category?
- Preview featured image using frontend post plugin
- Cron job not firing
- How to resize images due to container width automatically server side/without CSS
- Is there an easy way to flag posts in the admin area?
- How to create a managed image repository in wordpress
- Can’t delete Draft Post [closed]
- Outbound link autometic converted into linkdirect , and not opening
- wp_generate_attachment_metadata is creating an empty array
- Contributive page where people logged in can write
- Contact Form 7 Get Image Function [closed]
- Display wordpress post’s in popup?
- Unable to add TAB character to post?
- Implementing an image hosting website using WordPress? [closed]
- How to apply lazy loading in background images [closed]
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Woocommerce showing images blurry in description page
- Recent posts per category loop?
- ‘Organize Series Plugin’ as muti author feature
- Problem of encoding characters (apostrophes) in my posts publications
- How to backup single post in wordpress [closed]
- How to change the post form from plugin?
- Allowing users to Sign-up > Login > Post articles that need approval
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- posts from multiple post types in one slider
- How to display the featured post on the category page?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Is there a plugin or a way in the wordpress that would let us have different versions of a post or page accessibe to users?
- download button for audio file in post [closed]
- Print posts category or tag as a formatted journal
- Search by Attachment ID
- Overwrite add_image_size defined by theme
- Post deleted in trash [closed]
- How to relate 3 wordpress components with each other (Create database relationships)
- problem with register_activation_hook in plugin
- What snippet do I need to type to show my ACF field show up on my theme?
- Offer Download Links for Product Images
- Is there a way to make [Table Of Content] plugin while not using revision data?
- Is it possible to pin a post in second position from top
- page duplication on wordpress that wont stop
- Optimal image size for wordpress?
- How to add height and width to images on a page(using WP Bakery) to improve Google’s CLS score?
- Is classical wordpress eidtor a good option for me to include a large table with a large number of images on my webpage?
- Optimise wordpress database using SQL after deleting registered images from Media Folder
- I need to register and resize images, safe to delete plugin afterwards?
- Displaying all the images from all of my articles
- How can I see $post object in frontend from functions.php?
- Allow members to create groups on my site
- Why is my site still showing insecure icon even if I have SSL certificate?
- All Post WordPress Page Error
- Insert Sponsor logo in custom own theme
- Optimize and delete images in WordPress
- Upload image to wordpress using ionic/cordova with WP REST API V2
- Add dynamic color to each category item
- Publish Post but don’t call publish hook in foreground post creation
- export high ress images to pdf
- Better code/text editing for posts and pages?
- Any way to edit/crop my featured image upon uploading?
- adding image in the header of my dev widget
- SWF in wordpress post
- How to show post attachment image
- get post excerpt by query
- Advanced Custom Fields (ACF) Plugin – Random Image in Sidebar
- Images not showing and plugins not installing on wordpress server move
- How can I server scaled images?
- Adding hero images to blog posts
- Is there a WordPress Plugin like Imsanity that keeps high resolution originals? [closed]
- Images get uploaded itself from the computer
- Shortcode returning specific content of a post
- Looking for membership style plugin with edit option [closed]
- How to customized post slider layout in elementor wordpress [closed]
- How to export post tags from wordpress
- Show WooCommerce products based on query parameters on redirect