Files
bedrock/web/app/themes/badegg/resources/views/components/image.blade.php
Steve Ross 03e84836ca Add 'web/app/themes/badegg/' from commit 'b31aa7550b02a4516fdf161f53dc7666854c9a14'
git-subtree-dir: web/app/themes/badegg
git-subtree-mainline: b862ff9755
git-subtree-split: b31aa7550b
2025-11-22 17:26:50 +00:00

16 lines
356 B
PHP

@php($image = wp_get_attachment_image_src(@$id, 'medium'))
<img
@if(@$lazy)
src="{{ wp_get_attachment_image_src($id, 'lazy')[0] }}"
data-src="{{ $image[0] }}"
class="lazy"
@else
src="{{ $image[0] }}"
@endif
alt="{{ get_post_meta( $id, '_wp_attachment_image_alt', true ) }}"
width="{{ $image[1] }}"
height="{{ $image[2] }}"
/>