Closed thisislawatts closed 9 years ago
I like this idea. I'm just going to broaden it out a little bit. I'm going to add a new filter "picturefill_wp_process_this_image" that has a default value of true, and that will be passed the image DOM node and post HTML data to reference.
Conditionally excluding SVG could then be handled like this: ` add_filter('picturefill_wp_process_this_image', 'picturefill_wp_exclude_svg', 10, 3);
function picturefill_wp_exclude_svg($process, $image, $html){ if(preg_match('/.svg$/i', $image->getAttribute('src'))){ return false; } return $process; } `
This way we can exclude images conditionally, based on any of their attributes
Fixes #48