The image_send_to_editor
hook passes a whole range of parameters, not just the html. One of them is the size. To get it, hook your filter passing an 8 as the number of supported parameters:
add_filter('image_send_to_editor', 'my_filter_cb'), 10, 8);
and modify your function header to grab them all:
function my_filter_cb ($html, $id, $caption, $title, $align, $url, $size, $alt) {
...
}
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Show an image in my header.php
- How to create a managed image repository in wordpress
- Modifying the comments section through a plugin regardless of theme
- How to get the element ID from new menu list that added with add_filter()?
- How can I restrict image upload dimensions for non-admin WordPress users?
- White page by using filter template_include
- How to check current user before all actions and filters?
- How do I create a filter feature on WordPress? [closed]
- Create a navbar filter that filters by a custom field
- wp_generate_attachment_metadata is creating an empty array
- Passing an array from shortcode-function to filter-function
- Force media library editor to overwrite the original filename?
- Get Time Taken By Each Action Hook in WordPress
- Contact Form 7 Get Image Function [closed]
- How generate 200% image size and save with suffix @2x
- Load external images via proxy
- Filtering WooCommerce Orders by Category
- Bulk edit WP posts to update embeded images with new alt tags
- How to remove plugin metaboxes from edit.php
- Plugin developer automated documentation
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- qTranslate remove default directory from link
- How to disable a plugin for certain page?
- Output content to the_content before a plugin does
- Is there a hook to Intercept al urls from a webpage and redirect to a page
- Add padding while generating thumbnail
- WordPress user account activation
- Can we have an ‘Update metadata’ button in Image Gallery for all image instances?
- External Script Using WP – Hooks / Actions Not Working?
- Retrieving Meta from Image Attachment
- URL parameters causing 404 on home page, but nowhere else
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- Which filter affects the ‘entry-title’ post class
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Filtering get_permalink in Jetpack / ShareDaddy
- Make change in media library affect images in published articles
- Adding (image) caching to my Tumblr widget
- How to upload multiple files/images when developing a wordpress plugin?
- Image Manager Plugin [closed]
- Implementing an image hosting website using WordPress? [closed]
- Proper way to replace the_content only for pages created by custom plugin
- add_filter doesn’t work
- Bulk Image Upload And Rerrange Functionality
- Template filter for custom taxonomy terms
- Is there a way to figure out which action/filter invoked a function?
- How to apply lazy loading in background images [closed]
- Add sub menu page in your plugin
- Woocommerce showing images blurry in description page
- Slider/text combination plugin
- Plugin to hide image in excerpt
- Using add_action before add_filter on a plugin?
- Check if variable is set in filter
- What exactly happens to function argument availability when using a filter?
- Image change on hover
- How to write “alt” tag in image for wordpress code?
- Passing stored variables to add_filter
- Adding Static Image to WooCommerce Content-Single-Product template
- Modify page title and subtitle with a plugin
- override filter in a plugin
- Check filter defined or not?
- How do I get a post author’s image/avatar via RSS from another blog?
- remove_action not removing add_action from constructor
- In Woocommerce theme need to add custom external link [closed]
- Getting taxonomy images to display on single-post with their terms
- How can I apply a WP filter on specific plugin version
- Photo Gallery Plugin and Touch Devices
- Image crop, resize and compression plugin?
- How to Resize the Custom Post Images?
- Editing wp-config.php
- Plugin that will let me specify a number of image sizes?
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- Images under 1MB are not being compressed
- Skewed / slanted button within elementor [closed]
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- How to use the pre_option filter before a plugin loads?
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- Change text string in a plugin
- Plugin for an interactive image? [closed]
- Clear out old images, any advice?
- How to use filter to disable adding a product to wishlist?
- correctness of URL
- WordPress: Add custom add_filter for custom functions
- How to fix broken media library?
- How to accept images at multiple sizes and aspect ratios and display as standardized image size / ratio?
- How to get images using taxonomy ( WP Media Folder)
- adding Adsense’s In-Article Ads between images of blog post
- Add “Featured Image” box in my plugin post page
- Large amount image data transfer
- Advanced Custom Fields (acf) – Filter Relationship by Taxonomies not Post Type
- Override a Plugin Function
- How do I change where a plugin pulls updates from?
- Blurry images when loading the page first time
- Can I filter a function created by a theme or a plugin?
- Get Image Having the ID [closed]
- Image Galleries for website migrated from .com to .org
- How to have free shipping for WooCommerce Membership members
- How to use apply_filters?
- Search by Attachment ID
- Add a function call after content automatically?