Disappearing Images, where’d they go?

No doubt you’ve already come across the new WordPress filter. It protects you and me from malicious people who would like to steal your login information, bank details and first-born child.
Unfortunately it also does some annoying things.

One of those is so strip attributes from html tags. A common one that I’ve stumbled across is the IMG tag.
In my carefree days long ago, I would do <img src=”someurl”> and be done with it, but not any more. Kses adds a “/” at the end and if there isn’t a space after the src=”” bit, it strips that out! Grrr!
So, what have we learned? <img src=”someurl” /> works but
<img src=”someurl”> doesn’t.

A Nice Traffic light, hosted on Flickr.

4 responses to “Disappearing Images, where’d they go?”

  1. i haven’t had any issues with the html img tags being stripped. i have been having issues with uploaded images [into wordpress.com] disappearing. i’ve tried browsing for the missing images using the image browser but discovered the images are missing. i’ve sent feedback.. still waiting on a response. each time i try to reupload images and insert them into their corresponding posts, the images disappear again.

  2. I was having a problem with the img tags disappearing. I tried using /> but didnt work. The images were height=”125″ width=”125″ I changed it to height=”129″ width=”125″ and uploaded it and all my images started working. I still dont know why one simple little pixel change like that fixed it but if anyones having that problem then give it a try.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: