Questions tagged [responsive-images]

Responsive-images is the part of Responsive Web Design (RWD) dealing specifically with images on the web to provide optimal experiences across a wide range of devices based on screen size, platform, and orientation.

518 questions
3
votes
1 answer

Push images in corners and text in the middle

This Image below shows what should be achieved. Trying to make a Header with 4 images. All 4 in separate corners and a Text in the middle. When you shrink the display size for tablet or mobile the images and whole content should shrink with it.…
3
votes
0 answers

Safari load two images (dublicate with different sizes) from srcset in tag img

I had a problem in Safari when the page loaded in Devtools > Network drowser loaded two versions of the same image. For example: yNG3yARUuYG2BUZL___media_library_original_1080_1080.jpg and yNG3yARUuYG2BUZL___media_library_original_529_529.jpg I…
Pavlo
  • 31
  • 2
3
votes
0 answers

Responsive images: Combining different sizes with different resolutions

There are similar questions here but I didn't find a satisfying answer for myself. I want to combine the ability to display responsive images by viewport width and by resolution multiplicators ("x-descriptors"). here is my responsive image by…
low_rents
  • 4,481
  • 3
  • 27
  • 55
3
votes
1 answer

How can I preload correct number of images based on screen size?

I'm working to optimise Largest Contentful Paint (LCP), but am having trouble preloading the correct amount of LCP candidate images based on device size. The problem: on small screens, a single image shows in a carousel on larger screens, up to…
SRack
  • 11,495
  • 5
  • 47
  • 60
3
votes
2 answers

Material-UI changing IMG based on breakpoint

I'm familiar with using breakpoints to change my styling for height, width, font-size, and so on, but I'm having trouble finding examples of changing an image based on my screen size. Specifically I want to replace the image with a new image…
cwr__
  • 41
  • 1
  • 3
3
votes
0 answers

lazysizes - Aspect ratio not working for sources when {width} and {height} placeholders used

Seems that aspect ratio is not calculated for every picture source and only taken from the img tag itself. This prevents the plugin to work in art direction mode with different aspect ratio. img { width:100%; max-width:100%; …
Robert
  • 176
  • 1
  • 19
3
votes
1 answer

how to combine responsive images with signed urls

I am using signed urls for images but also would like them to be responsive. Do I really need to sign all size versions of the picture? It seems more efficient if first the actual size that will be shown is determined so I only need to provide a…
3
votes
1 answer

Images Get Stretched on Circle Image - Bootstrap & SCSS

PLEASE HELP !!! I am using bootstrap cards to make a section of my website.I am facing issue in circle image of the cards.I want my images do not get stretch when i put them in image circle of card.Is there a way i can zoom in middle of the image…
MA-2016
  • 653
  • 3
  • 10
  • 30
3
votes
1 answer

Same background image gets displayed multiple times on the webpage

I've build a simple web page which includes a background image in the body tag and the background-size is set to cover in css file.When i resize my chrome window the original image gets displayed adjacent to same image and so on just like a…
xufor
  • 79
  • 2
  • 8
3
votes
1 answer

Can I use `` or `` for image size rather than viewport size?

I'm trying to use to load images based on the size they'll appear on the page, rather than based on the size of the viewport. Perhaps examples will help: On any viewport, when the image is styled with width: 100% inside a 200px-wide…
jessepinho
  • 5,580
  • 1
  • 19
  • 19
3
votes
2 answers

Displaying Loading Image using CSS

I currently have the following CSS code that I apply to a div element that displays a responsive image. .my-img-container { position: relative; &:before { display: block; content: " "; background:…
Sammy
  • 3,395
  • 7
  • 49
  • 95
3
votes
0 answers

srcset of Image puts height to 30px in Edge

For this page, my clients notices that the images are cropped up to the height of 30px, keeping the same width. https://www.agricamp.be/producten/akkerbouw/meststoffen/kalkmeststoffen/ After investigation, it's a problem with the Edge browser.…
DaveL
  • 127
  • 1
  • 8
3
votes
1 answer

Srcset with multiple min-width vw and px values, which wins and why?

I've been having trouble with my sizes attribute. I asked a question a while ago about which order you should declare sizes in and Yoav said: "Your sizes value should start off at the narrowest breakpoint, and gradually move to the wider ones, so in…
patrickzdb
  • 928
  • 1
  • 10
  • 26
3
votes
2 answers

How to make a background image responsive in CSS

I asked a question previously on getting 2 divs to sit inside another div bootstrap container (1 top left, and 1 bottom right) which has now been solved. My next issue is, in the main div (with 2 divs sitting inside) I need a large background image,…
user3642210
  • 111
  • 1
  • 1
  • 12
3
votes
1 answer

Picturefill and lazyloading with lazysizes

I'm trying to get lazyloading with lazysizes and picturefill to work. The lazyloading itself works if I just use a basic image: If I check the network tab in chrome, I can see that the…
NthDegree
  • 1,301
  • 2
  • 15
  • 29