Hey @franse, you can address this using media queries in your CSS to adjust the image size based on screen size.
/* Styles for the image on smaller devices like mobile */
@media (max-width: 767px) {
.custom-image {
max-width: 100%; /* Adjust image to container width */
height: auto; /* Maintain image aspect ratio */
}
}
/* Styles for the image on larger devices like desktop */
@media (min-width: 768px) {
.custom-image {
max-width: 100%; /* Adjust image to container width */
height: auto; /* Maintain image aspect ratio */
}
}
This CSS sets the image to have a maximum width of 100% of its container across all screen sizes. However, it ensures that the image doesn’t extend beyond the width of its container.
Make sure to adjust the values in the media queries ( max-width and min-width ) according to your specific design needs.
Thanks @Max_Saravia
Yes I was thinking avoiding using media queries.
Hoping I can disable .img-fluid {max-width} so custom css can use it
But I guess your input it’s the only way