Responsive image

Hi, I just started Kirby and is very new to php.

May I ask how can I product the following result with php code? It is a product image that resize automatically when I change the browser width. I extracted the code for reference.

<source srcset=" 1x, 2x" media="(max-width:450px)">
<source srcset=" 1x, 2x" media="(max-width:1000px)">
<img srcset=" 1x, 2x" decoding="async" loading="lazy" src="" alt="demo-alt">

Hey @jinhoe ,

i think what you are looking for is the kirby cms thumb() method.
There is also a code example on the bottom of the page.

Got it, thank you.