I am using the ImageScaler plugin for WordPress on a project, and I like what it does, but it adds a non-standards-compliant attribute to images, such as: <img class=”” src=”http://www.example.com/imagescaler/generated-image.jpg” alt=”Example” width=”258″ height=”234″ imagescaler=”http://www.example.com/imagescaler/original-image.jpg” /> To strip imagescaler’s imagescaler attribute, add the following into your functions.php file: add_filter(‘the_content’, ‘strip_imagescaler’); function strip_imagescaler($content) { $content = preg_replace(‘/imagescaler=”(.*?)”.?/s’,”, […]
Tag: images
This is for everyone who’s been trying to find out how to get the medium image size of a post attachment in WordPress: You’ve got to send the function the ID you’re trying to get the medium images for. $medium = wp_get_attachment_image_src($picture->ID, ‘medium’, false); $med_url = $medium[0]; $med_width = $medium[1]; $med_height = $medium[2]; There are […]
A picture [of my cat] is worth a thousand words. I’ve been waiting for WordPress.com to update the administration panel so that I can have galleries. That is the main feature that I’ve been waiting for. Now it’s here, I can finally upload pictures of my cat (and my wife 🙂 ) This will […]
You must be logged in to post a comment.