Files
bedrock/web/app/themes/badegg/resources/views/components/image.blade.php
Steve Ross 76520e58d2 Add 'web/app/themes/badegg/' from commit '2b425fd2ea8083ef47852429a353e1afc4e93bf8'
git-subtree-dir: web/app/themes/badegg
git-subtree-mainline: 272b0f6525
git-subtree-split: 2b425fd2ea
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] }}"
/>