Support Forum » User Profile

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Image Size Using Twig / Block Builder #27069
    RobertRobert
    Participant

    Hello,

    This is the part of code, that works but displays only small thumbnail:

    
    <div class="wp-block-column is-vertically-aligned-top" style="flex-basis:25%">                <figure class="wp-block-image size-large">{{ zdjecie_produktu }}</figure>
    </div>
    

    What I want to do, is use medium image - thats what I tried, but it does not work:

    
    <div class="wp-block-column is-vertically-aligned-top" style="flex-basis:25%">                <figure class="wp-block-image size-large"><img src="{{ zdjecie_produktu.medium.url }}"></figure>
    </div>
    

    The field 'zdjecie_produktu' is just a regular 'Single Image' custom field, thumbnail size is set to 'Medium'. No other customizations are made.

    As I mentioned, when I try to output the complete array, I just get '1' as the output.

    in reply to: Image Size Using Twig / Block Builder #27036
    RobertRobert
    Participant

    Hi Long,

    I have the same issue and for some reason I cannot get the url of medium image (single image field) in gutenberg block. I tried your method with print_r, but it just returns 1 and nothing else. Any idea what can be the problem?

Viewing 2 posts - 1 through 2 (of 2 total)