WordPress.org

Ready to get started?Download WordPress

Forums

WP Mobile Detector Mobile Plugin
[resolved] Prevent image resizing (7 posts)

  1. pankas87
    Member
    Posted 1 year ago #

    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/

  2. websitezcom
    Member
    Plugin Author

    Posted 1 year ago #

    If you're comfortable editing the files, you can comment out the function that resizes images in the functions.php file.

  3. pankas87
    Member
    Posted 1 year ago #

    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!

  4. websitezcom
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks you too!

  5. TimBiden
    Member
    Posted 1 year ago #

    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?

  6. websitezcom
    Member
    Plugin Author

    Posted 1 year ago #

    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')) {

  7. TimBiden
    Member
    Posted 1 year ago #

    Well now, that's easy. And thank you for the quick reply. :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic