Support

Account

Forum Replies Created

  • See below… Would something like this even be possible? It keeps breaking my website (Bad Gateway) when I attempt.

    <?php
    $dimage = get_field(‘hero_highlight_2_d2’);
    $mimage = get_field(‘hero_highlight_2_m2’);
    if( !empty($dimage) ):
    $dbig = ‘hero-highlight-2-866×480-dbig’;
    $dsmall = ‘hero-highlight-2-433×240-dsmall’;
    $mbig = ‘hero-highlight-2-760×680-mbig’;
    $msmall = ‘hero-highlight-2-380×340-sbig’;

    $deskx2 = $dimage[‘sizes’][ $dbig ];
    $desk = $dimage[‘sizes’][ $dsmall ];
    $mobilex2 = $mimage[‘sizes’][ $mbig ];
    $mobile = $mimage[‘sizes’][ $msmall ];

    ?>
    <source data-srcset=”<?php echo $desk; ?> 1x, <?php echo $deskx2; ?> 2x” media=”(min-width: 1080px)” srcset=”<?php echo $desk; ?> 1x, <?php echo $deskx2; ?> 2x”>

    1x, <?php echo $mobilex2; ?> 2x” alt=”” srcset=”<?php echo $mobile; ?> 1x, <?php echo $mobilex2; ?> 2x”>

    </picture>

    <noscript><picture class=”picture”>
    <source srcset=”<?php echo $mobile; ?> 1x, <?php echo $deskx2; ?> 2x” media=”(min-width: 1080px)” />Instagram profile picture
    1x, <?php echo $deskx2; ?> 2x” alt=”” />
    </picture></noscript>

    <?php endif; ?>

Viewing 1 post (of 1 total)