Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1495429

    Dear Enfold Theme,
    We are currently implementing a gallery page where a lightbox opens in a gallery with additional data and the image. Unfortunately, the image is only displayed partially. We are using the following function for this:

    $grid = new avia_post_grid(
                                            array(
                                                'linking'			=> ‘’,
                                                ‘columns’            => ‘3’,
                                                ‘contents’            => ‘title’,
                                                ‘sort’                => ‘no’, 
                                                'paginate'			=> ‘yes’,
                                                ‘set_breadcrumb’    => false,
                                                ‘preview_mode’        => ‘auto’,
                                                ‘image_size’        => ‘full’
                                            ));
    
    						$grid->use_global_query();
    echo $grid->html( ‘’ );

    Highlighted in bold that the full images should actually be used. However, this does not seem to work.

    • This topic was modified 3 weeks ago by RENZCOM.
    • This topic was modified 3 weeks ago by RENZCOM.
    #1495441

    i guess you only want to influence the lightbox images source. And because Enfold uses on default the large image. This does not always uses the original aspect ratio.

    I would not influence the thumbnail sizes of the gallery. Only the lightbox source image.
    If you are usiing the gallery element try:

    function custom_alb_lightbox_image_size( $size, $context ){
      if( $context == ('av_gallery' || 'avia_masonry') ){
        return 'original';
      }
      return $size;
    }
    add_filter( 'avf_alb_lightbox_image_size', 'custom_alb_lightbox_image_size', 10, 2 );
    #1495459

    Hi,

    Thank you for the inquiry.

    Adding this filter in the functions.php file might also help.

    add_filter( 'avf_avia_builder_helper_lightbox_size', function( $size, $context, $post_id, $responsive_lightbox ) {
        return 'full';
    }, 10, 4 );
    

    Let us know the result.

    Best regards,
    Ismael

    #1495489

    Thank you for the quick answers and the provided code examples.
    Sorry for the misunderstanding. My intention was to show a full size image In the post grid, not in the lightbox itself. Is there any chance I can achieve that with the avia_post_grid object?

    #1495509

    Hi,

    Thank you for the clarification.

    How did you add the Portfolio Grid? Did you create a custom element? Try setting the preview_mode to custom to ensure that the image_size does not revert to the default.

    Best regards,
    Ismael

    #1495519

    Your description of the whole thing is quite unclear.
    Which Enfold element did you use? Portfolio Grid? ( When I searched for avia_post_grid in the Enfold folder, I only found portfolio.php as an element with such an entry. )

    Then you selected “Open in Lightbox” for link handling.
    You can set the preview image size in the “Styling” tab – Grid settings:
    To do this, you must first select “Select the grid image size manually” under “Portfolio Grid Image Size”—a second drop-down menu will then open where you can specify the grid image size.

    Do you like to change something on the lightbox images – or the bottom-bar text?

    #1495545

    Thank you, that was exactly what I was looking for.

    For further clarification: I am using a Custom Post Type in a child theme. The avia_post_grid I am using in own version of taxonomy.php for this custom post type’s category. This is the temporary dev link if you want to have a further look: https://galerievalentin.renzcom.de/artist/boehringer-volker/

    #1495558

    Hi,

    Great! Let us know if you have more questions. Have a nice day.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Cropped images in Lightbox’ is closed to new replies.