Forums

Next Gen Gallery's Galleryview portrait AND landscape images (3 posts)

  1. clockeby
    Member
    Posted 1 year ago #

    Hello again ladies and gents! This one is for Alex Rabe...
    First, a HUGE thanks for NextGen Gallery. Great plugin that is making life easier for a lot of people using WordPress.

    Now for my question... I've seen this asked in several locations but never with an answer so I thought I'd ask here...

    How can I keep my main image's aspect ratio using Galleryview for NextGen Gallery?

    I've got several images that switch between portrait and landscape and I can either have one or the other look correct. The site I'm building is for a photographer so the image quality is a primary concern. I've edited galleryview.css and gallery-galleryview.php to display my images at 700px x 500px (my main content display area is 755px). This is great for the landscape shots, but then my portrait shots are squished. And if I change it, the reverse happens...

    Is there some variable I can put in to show all of the photos correctly?

    Thanks in advance and for a great product!

  2. fidififouille
    Member
    Posted 1 year ago #

    Hi,

    I downloaded the plugin yesterday, and try to display as well portrait and landscape pictures !!!
    I tried to modified galleryview.css, nggGalleryview.php, gallery-galleryview.php, but with no success...
    I'm still looking withint the code.

    Please HEEEELP ;)

    Cheers,
    Fifi

  3. fidififouille
    Member
    Posted 1 year ago #

    Yoo,

    Found a solution: I use the real width and height size of my picture to show in the panel of galleryview. Width and height are stored in the wp_ngg_pictures.meta_data.

    Do to this:
    - In galleryview.css, don't put any width and height fixed size.
    Ex:
    .galleryview .panel img { background: none;}

    In gallery-galleryview.php replace the line 22 by
    <img src="<?php echo $image->imageURL ?>" width="<?php echo $image->meta_data['width']; ?>" height="<?php echo $image->meta_data['height']; ?>" />

    Need to change the .panel class in order to show the picture in the middle (use margin:auto).

    cheers,
    Fifi

Topic Closed

This topic has been closed to new replies.

About this Topic