Title: Invalid img code
Last modified: February 24, 2019

---

# Invalid img code

 *  Resolved [multiformeingegno](https://wordpress.org/support/users/lorenzone92/)
 * (@lorenzone92)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-img-code/)
 * In my theme I have the following code to display a simple image
 * `<img alt="Twitter" src="<?php echo get_stylesheet_directory_uri(); ?>/images/
   twitter.png"></a>`
 * But with the plugin activated the code is changed to this (which is invalid and
   the image is not displayed):
 * `<img alt="Twitter" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/
   2000/svg'%20viewBox='0%200%201%201'%3E%3C/svg%3E" data-lazy-src="https://website.
   com/wp-content/themes/theme-name/images/twitter.png"><noscript><img alt="Twitter"
   src="https://website.com/wp-content/themes/theme-name/images/twitter.png"></noscript
   >`
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-img-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [WP Rocket](https://wordpress.org/support/users/wp_rocket/)
 * (@wp_rocket)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-img-code/#post-11245402)
 * Hi,
 * I just visited the page you provided and the twitter image is correctly being
   displayed on it. Can you check again?
 *  Thread Starter [multiformeingegno](https://wordpress.org/support/users/lorenzone92/)
 * (@lorenzone92)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-img-code/#post-11251521)
 * I still don’t see it:
    [https://img42.com/OO3ZR](https://img42.com/OO3ZR)
 * Also don’t see it on Safari Mobile from iOS, but weirdly enough I can from Firefox.
 *  Thread Starter [multiformeingegno](https://wordpress.org/support/users/lorenzone92/)
 * (@lorenzone92)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-img-code/#post-11252470)
 * I’ve updated to 2.1 and now it seems to work properly

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Invalid img code’ is closed to new replies.

 * ![](https://ps.w.org/rocket-lazy-load/assets/icon-256x256.png?rev=2715509)
 * [LazyLoad Plugin – Lazy Load Images, Videos, and Iframes](https://wordpress.org/plugins/rocket-lazy-load/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rocket-lazy-load/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rocket-lazy-load/)
 * [Active Topics](https://wordpress.org/support/plugin/rocket-lazy-load/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rocket-lazy-load/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rocket-lazy-load/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [multiformeingegno](https://wordpress.org/support/users/lorenzone92/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/invalid-img-code/#post-11252470)
 * Status: resolved