Support » Plugin: Slideshow » [Plugin: Slideshow] Fix for images too tall

  • Using ?

    If your images are too tall, you can add the following to the end of slideshow.php:

    function removeImageWidthHeight($html) {
        $doc = Domdocument::loadhtml($html);
        foreach ($doc->getelementsbytagname('img') as $image)
            foreach (array('width', 'height') as $attribute_to_remove)
                if ($image->hasattribute($attribute_to_remove))
        return $doc->savehtml();

    Then, right before this line:

    return apply_filters( 'slideshow_shortcode', $slideshow );

    Add this:

    $slideshow = removeImageWidthHeight($slideshow);

  • The topic ‘[Plugin: Slideshow] Fix for images too tall’ is closed to new replies.