Okay
  Public Ticket #201370
Better cropping options for galleries
Closed

Comments

  •  1
    Niklas started the conversation

    Hi! In the link above, you see a portfolio item where I'm using the grid image gallery with fullsize option.

    It would be great if I could define where an image is cropped for every image: top, middle, bottom and left, center or right.

    Is that already possible? Think that would be great to have a control over how the images are cropped...

  •  1
    Niklas replied

    And again... I forgot to set it to "public" :) Sorry! :-D

  •  8,940
    Tahir replied

    Hey Niklas!

    Are you referring to the images in the portfolio thumbs . You can crop them using the Native Wp editor.

    Thanks


    ThemeNectar Support Team 

  •  1
    Niklas replied

    Ah I see! I thought that with saving the cropping for all images, the full image would be cropped, too! But it isn't! :) Thanks!

  •  1
    Niklas replied

    AH yeah... could be closed :)

  •  1
    Niklas replied

    Sorry, I was wrong! It's different...

    In the first case (1. image) the image in the lightbox is not cropped.
    http://www.niklasmoeller.de/portfolio/lets-rock-th...

    In the second case (3. image) the image in the lightbox is cropped, too!
    http://www.niklasmoeller.de/portfolio/outdoor-shoo...

    Can you explaine the different behaviours?


  •  8,940
    Tahir replied

    Hey Niklas!

    I am afraid i can not make assumptions on what you did wrong by just taking a look at the images. You have full control of images within the WP Dashboard therefore i would suggest you experiment with the built in options and choose what works best for you .

    Thanks


    ThemeNectar Support Team 

  •  1
    Niklas replied

    But in which cases is the original image placed in the lightbox and when is the cropped version taken? Hope you can tell me, because the only difference I can see is the resolution of the source image!

  •  8,940
    Tahir replied

    Hey Niklas!

    Sorry but i am still not able to understand fully your question. The uploaded image is used as full since its the original and the cropped one is used for thumbnails.

    Thanks


    ThemeNectar Support Team 

  •  1
    Niklas replied

    But that's not always the case!Take a look at my 2nd link from above:

    http://www.niklasmoeller.de/portfolio/outdoor-shoo...

    The third image is cropped as I wished in the preview, but the image in the lightbox is cropped, too! It shows this one:

    http://s.niklasmoeller.de/inhalt/uploads/2012/08/2...

    instead of the original:

    http://s.niklasmoeller.de/inhalt/uploads/2012/08/2...

    So it look like the full image in the lightbox is not always the uncropped version. Sometimes it is, as you can see here, where the image in the lightbox is not cropped. I cropped both pictures the same way. The only difference I can see is the pictures resolution.

    http://www.niklasmoeller.de/portfolio/lets-rock-th...

  •  1
    Niklas replied

    Now I've got a post where you can see both behaviours! I needed to crop both because one was a panorama and the other one was a portrait oriented picture. Else they wouldn't have fit the grid gallery layout!

    http://www.niklasmoeller.de/2014/05/grand-canyon-r...

    Image #3 (Badwater Basin)
    Original: http://s.niklasmoeller.de/inhalt/uploads/2014/05/...
    Lightbox: http://s.niklasmoeller.de/inhalt/uploads/2014/05/...

    Image #6 (Natural Bridge)
    Original: http://s.niklasmoeller.de/inhalt/uploads/2014/05/...
    Lightbox: http://s.niklasmoeller.de/inhalt/uploads/2014/05/...

    In the media library, I cropped both to a 3:2 ratio. #3 shows the cropped version in lightbox (but not in the header!) and #6 shows the right version (just a smaller version) in the lightbox!

    Hope you can see my problem here :)


  •  1,086
    ThemeNectar replied

    Hey Niklas! By default Visual Composer serves the lightbox image in the large size which does have some cropping - however to remove that, you can open the vc_gallery.php file located in nectar/nectar-vc-addons/vc_templates and replace lines 174 – 193 with this http://pastebin.com/4yP87A37

    Cheers :)


  •  1
    Niklas replied

    Oh ok... now I know why some are cropped! The setting for "large" in my case is 1024 max for both: height & width.

    The images that looks incropped are smaller versions of the original. But because in the original, the shorter side already was under 1024, the shorter side is only resized in relation to the longer side, so that the longer one can be 1024. When both sides are over 1024, the images get cropped.

    Strange behaviour from wordpress developers side, I think. Got to talk to them :'-D

    Thank you! Now I understand why the image is cropped! I could solve the problem by just setting the larg image size to a size larger then my original, so it does not get cropped.

    Is there a recommended setting for the image sizes for your theme?

  •  1
    Niklas replied

    And one more question:

    Which image size is used for the grid gallery? Is it one of the defaults or a custom image size?

    //EDIT
    Forget about that! I forgot, that I'm doing that in the settings ;)