Title: Prevent image resizing
Last modified: August 20, 2016

---

# Prevent image resizing

 *  Resolved [pankas87](https://wordpress.org/support/users/pankas87/)
 * (@pankas87)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/)
 * Is there any way to prevent image resizig? I’d like to show images full size 
   on mobile devices and use some lazy loading techniques instead of resizing.
 * Thank you.
 * [http://wordpress.org/extend/plugins/wp-mobile-detector/](http://wordpress.org/extend/plugins/wp-mobile-detector/)

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

 *  Plugin Author [websitezcom](https://wordpress.org/support/users/websitezcom/)
 * (@websitezcom)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/#post-3316900)
 * If you’re comfortable editing the files, you can comment out the function that
   resizes images in the functions.php file.
 *  Thread Starter [pankas87](https://wordpress.org/support/users/pankas87/)
 * (@pankas87)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/#post-3316907)
 * I found this function websitez_filter_advanced_page, commented everything in 
   it and wrote a return statement that returns the original $html parameter without
   any modification. Is that ok or should I do something more?
 * EDIT: Yeah, it worked like a charm, thank you! Have a happy new year!
 *  Plugin Author [websitezcom](https://wordpress.org/support/users/websitezcom/)
 * (@websitezcom)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/#post-3317096)
 * Thanks you too!
 *  [TimBiden](https://wordpress.org/support/users/timbiden/)
 * (@timbiden)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/#post-3317248)
 * > I found this function websitez_filter_advanced_page, commented everything in
   > it and wrote a return statement that returns the original $html parameter without
   > any modification.
 * Pankas87, Ok, so how did you write it? Can you post an example?
 *  Plugin Author [websitezcom](https://wordpress.org/support/users/websitezcom/)
 * (@websitezcom)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/#post-3317249)
 * TimBiden, on the very first line of the function “websitez_filter_advanced_page”
   just put “return $html;” and you should be all set.
 * function websitez_filter_advanced_page($html){
    return $html; if (class_exists(‘
   DOMDocument’)) {
 *  [TimBiden](https://wordpress.org/support/users/timbiden/)
 * (@timbiden)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/#post-3317250)
 * Well now, that’s easy. And thank you for the quick reply. 🙂

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

The topic ‘Prevent image resizing’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mobile-detector_899b74.svg)
 * [WP Mobile Detector](https://wordpress.org/plugins/wp-mobile-detector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mobile-detector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mobile-detector/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mobile-detector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mobile-detector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mobile-detector/reviews/)

## Tags

 * [image resizing](https://wordpress.org/support/topic-tag/image-resizing/)
 * [prevent](https://wordpress.org/support/topic-tag/prevent/)

 * 6 replies
 * 3 participants
 * Last reply from: [TimBiden](https://wordpress.org/support/users/timbiden/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/prevent-image-resizing-1/#post-3317250)
 * Status: resolved