Skip to content

zk-image ​

Renders an <img> element with full attribute support including srcset, crossorigin, and loading.

Props ​

PropTypeDefaultDescription
srcstring|nullnullImage URL
altstring|nullnullAlt text
classstring|nullnullCSS class(es)
widthint|nullnullIntrinsic width
heightint|nullnullIntrinsic height
srcsetstring|nullnullsrcset attribute
sizesstring|nullnullsizes attribute
loadingstring|nullnulllazy or eager
decodingstring|nullnullasync, sync, or auto
fetchprioritystring|nullnullhigh, low, or auto
crossoriginstring|nullnullanonymous or use-credentials — invalid values are silently ignored
referrerpolicystring|nullnullReferrer policy
ismapboolfalseServer-side image map
usemapstring|nullnullClient-side image map reference
longdescstring|nullnullURL of long description

Examples ​

Basic ​

blade
<x-zk-image src="/img/hero.jpg" alt="Hero image" />

Responsive with srcset ​

blade
<x-zk-image
    src="/img/photo.jpg"
    alt="A photo"
    srcset="/img/photo-480.jpg 480w, /img/photo-800.jpg 800w"
    sizes="(max-width: 600px) 480px, 800px"
    :width="800"
    :height="600"
    loading="lazy" />

With explicit dimensions for CLS ​

blade
<x-zk-image
    src="{{ $product->image_url }}"
    alt="{{ $product->name }}"
    :width="400"
    :height="400"
    loading="lazy"
    decoding="async" />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.