Pretty Photo Lightbox / Videos on Mobile – Too Small

This is related to a site I’m building in WordPress. I am having trouble making Pretty Photo Lightbox work for small screened devices. By default it opens a very small and unuseable lightbox on phones. I’ve found several threads about how to fix it and none seem to do the trick. Has anyone here done this successfully? I am using it with the Justified Image Grid Plug-in. Thanks!

Related posts

Leave a Reply

1 comment

  1. I’m using mobile detect from http://mobiledetect.net/

    In my PHP file I include the mobile_detect.php

    and check for mobile devices as follows:

    <?php
    
    include 'Mobile_Detect.php';
    
    $detect = new Mobile_Detect();
    
    ?>
    
    //prettyPhoto js goes here
    ......
    
    
    
    
    <a id="video_link" href="https://www.youtube.com/watch?v=qKhsb0bxuRo&rel=0" 
    <?php
    
    if ($detect->isMobile() && !$detect->isTablet()) { 
        echo ""; //hide from iphones and force iOS to open YouTube app instead
    }elseif ($detect->isTablet){ 
        echo "rel="prettyPhoto""; //show prettyPhoto on tablets
    }else{ 
        echo "rel="prettyPhoto""; //also show prettyPhoto popup on desktops
    }
    
    ?>
    
     title=""><img src="images/play-video.png" alt="" title="" width="380" height="147" /></a>