Hello
Iam New to wordpress,I want to create slider section I have created image with dimensions of 1920×820 px for slider image
I want to optimize the image like the screenshot I have attached you can see the same image is looking perfect on desktop view and also on mobile specially mobile view usually what happens it looks like crop version of that image on mobile view
So I want to do it like that can you please help me or guide me
I don’t know if you’re using a builder or what, but as a developer what we typically do is make use of the `<Picture />` element. The element allows you to define different image sources based on device or orientation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture
Create multiple versions for each device size while keeping the same aspect ratio to optimize the images. Make sure your slider supports responsive images, as this makes a big difference! Also add custom CSS with `background-size: cover;` to avoid cropping. Using JPEG for photos and PNG for transparency works well, or you can try WebP for better compression and don’t forget to preview the slider on both desktop and mobile!