devjoe
New Coder
Hi everyone,
I’m working on a client’s site (Spiritual Gleam), and I’ve run into an issue with images. Some images are getting cropped or only partially loading, especially on mobile.
Here’s what I’m using in the HTML:
<img src="path-to-image.jpg" alt="Symbolic Image" class="spiritual-img">
And the CSS:
.spiritual-img {
width: 100%;
height: auto;
object-fit: cover;
}
I thought object-fit: cover would solve the cropping, but it’s still happening. Plus, some images don’t fully load at times.
Any ideas on what might be causing this? I’m stuck. Appreciate any help!
Thanks!
I’m working on a client’s site (Spiritual Gleam), and I’ve run into an issue with images. Some images are getting cropped or only partially loading, especially on mobile.
Here’s what I’m using in the HTML:
<img src="path-to-image.jpg" alt="Symbolic Image" class="spiritual-img">
And the CSS:
.spiritual-img {
width: 100%;
height: auto;
object-fit: cover;
}
I thought object-fit: cover would solve the cropping, but it’s still happening. Plus, some images don’t fully load at times.
Any ideas on what might be causing this? I’m stuck. Appreciate any help!
Thanks!