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]
- How do I exclude plugins from getting automatically updated?
- Where is the best place to use add_filter
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Resizing all images
- plugin_action_links Filter Hook Deprecated?
- Filter Hook on plugin update
- Automatically Import Image into Posts from URLs on the Web?
- How can I attach images to a post from the media library?
- How can I show drafts in wp_dropdown_pages list?
- Rename existing old uploaded images containing accented French characters (not during upload)
- Thumbnail with different sizes
- Use external link in the add sub menu
- Failed to invoke other hook from the init hook
- How can I filter blog name?
- Disabling post images for not logged in users
- How to upload thousands of images?
- Custom preview_post_link not working for draft post
- Determine plugin name from within plugin_action_links filter
- Getting media library popup in custom plugin admin page
- bulk change of image setting “link to” to “link to: image url “
- How to remove xmlns on language_attributes()?
- When to call add_filter
- Images not showing after changing wp-content folder name
- Preview featured image using frontend post plugin
- Edit default comments page in WP Admin
- How to Delete all Unused photos Function
- How to resize images due to container width automatically server side/without CSS
- Inserting above the comment template
- Creating a plugin to sanitize comment and the url field before display only
- How to create a managed image repository in wordpress
- How to check current user before all actions and filters?
- How do I create a filter feature on WordPress? [closed]
- wp_generate_attachment_metadata is creating an empty array
- Contact Form 7 Get Image Function [closed]
- Load external images via proxy
- qTranslate remove default directory from link
- How to disable a plugin for certain page?
- WordPress user account activation
- URL parameters causing 404 on home page, but nowhere else
- Which filter affects the ‘entry-title’ post class
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Implementing an image hosting website using WordPress? [closed]
- Template filter for custom taxonomy terms
- What exactly happens to function argument availability when using a filter?
- Photo Gallery Plugin and Touch Devices
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- How to use the pre_option filter before a plugin loads?
- Override a Plugin Function
- Blurry images when loading the page first time
- Can I filter a function created by a theme or a plugin?
- Search by Attachment ID
- Hook for altering the content of all wp mails
- Some images on WordPress site are suddenly gone
- Looking for a filter to modify the months
- What’s the best way to echo out a filter variable?
- Simple sildeshow/image-upload plugin?
- apply_filters(woocommerce_get_item_data, …) Causing errors when adding to cart
- How to convert Currency from USD to other IP Based currency in Php function
- how to remove share button from image overlay
- Is classical wordpress eidtor a good option for me to include a large table with a large number of images on my webpage?
- post title not changing at post page
- Using OR Condition with facetwp facets
- insert og image link in wordpress post
- How i remove specific script from header?
- Optimise wordpress database using SQL after deleting registered images from Media Folder
- Redirect to a page while maintaining search query parameters without causing an infinite loop
- Displaying all the images from all of my articles
- Product Page loads terribly slow when product gallery images are added
- How to use third-party SendGrid Email Validation API in Gravity Forms?
- 500 Internal server error wp_handle_upload_prefilter
- WordPress how do I change images used in plugins?
- Why is my site still showing insecure icon even if I have SSL certificate?
- Using Filters to modify contect – DB query results alwats appear fist
- Help finding a plugin – masonry type post grid
- How to wrap image tag into div for post only?
- Customize plugin templates
- Insert Sponsor logo in custom own theme
- What action or filter can I use to change all the html returned from server for a page?
- Optimize and delete images in WordPress
- WordPress Add advertising ads befor and after content with periority [closed]
- Upload image to wordpress using ionic/cordova with WP REST API V2
- Edit plugin filter
- Add image to post
- How to force regenerate thumbnails in WordPress posts?
- trying to create simple plugin to filter categories from all authors
- How do i get all author posts on custom post type list
- How to filter a a variable in a plugin’s function?
- Retrive images from the_content()
- How to select featured images for 1500 posts?
- Filter the HTML content of plugin
- Display alt text as tool tip on page
- Which filters or actions involve with index page for plugin?
- Adding Relevant Post Images
- Image Layout in Posts
- WP Members additional fields on user profile [closed]
- how to embed a crop feature for cropping images uploaded by the user
- How to add product thumbnail on orders list on backend?
- Change social icon in twenty twenty three theme
- How do i display the number of images on the “post screen”