Questions tagged [srcset]

The srcset attributes on the img element can be used, using the x descriptor, to provide multiple images that only vary in their size

390 questions
0
votes
1 answer

Image srcset sizes

I've this:
0
votes
0 answers

React and srcSet: images loading time

I am working with React. I have a grid with some images, with srcset —srcSet in React—. Each image looks something like this:
user7499416
0
votes
1 answer

CSS grid + srcset + sizes work with multiple widths and screen resolutions?

I have a 14 column css grid that's centered on the page on desktop. All my images are set to max-width: 100% so the width is dependent on the width of the column container.
meijiOrO
  • 411
  • 4
  • 7
  • 14
0
votes
0 answers

Import mutiple files with one import via Webpack Plugin

I saw the NormalModuleReplacementPlugin (source code), and wanted to do the same but for images srcsets. I import images like so: import image from './image.jpg', but would also like to handle @2x and @3x images without having to import them…
adrienharnay
  • 795
  • 2
  • 9
  • 27
0
votes
0 answers

WordPress's wp_get_attachment_image_srcset is not returning all the image srcset sizes

I have a small function in my WordPress theme that returns responsive images - or at least, it is supposed to. I wanted to add some additional sizes to the images, so I used "add_image_size" and regenerated the thumbnails. But I can't get the larger…
Kimberly Fox
  • 617
  • 6
  • 13
0
votes
1 answer

HTML scrset attribute loading wrong image

I am having an issue with loading the correct responsive image using scrset. I am using the following sizes attribute: sizes="(max-width: 767px) 95vw, 768px" and the following scrset…
giulio
  • 13
  • 6
0
votes
1 answer

Responsive images using img srcset

I'm having bit trouble understanding how it works / should work.. The below is generated code, I added some linebreaks and spaces for readability.
OZZIE
  • 6,609
  • 7
  • 55
  • 59
0
votes
1 answer

Quesiont about picture srcset tag

i'm trying to show a image that has better resoultion, and not so heavy size img on my mobile web view site, by using the srcset. Here is the problem. My current page gets img_260 which is 260x260 size. But my tag has to be 140 ~ 180 width size […
0
votes
0 answers

How to prevent an image being downloaded on mobile?

Assuming this markup:
Chris
  • 463
  • 2
  • 6
  • 16
0
votes
1 answer

Select source 'srcset' with jquery

I would like to know how to select spcecific 'srcset' in my code using js. This is my actually not working js code : var imgPath = $('.wp-post-image').attr('srcset'); $('.tax-product_tag .breadcrumbs').css('background', 'url(' + imgPath + ')'); And…
yann
  • 11
0
votes
1 answer

How to declare image srcset so that it doesn't consider retina screen

I'm using a different img srcset depending on the width. This is my code:
Luiscri
  • 913
  • 1
  • 13
  • 40
0
votes
0 answers

Using srcsets to deliver images for different browser widths

Using WordPress, I uploaded an image that's 400x200. It produced a 'medium' and 'thumbnail' size. I'm trying to load 'thumbnail' in so that it's used for, let's say, 768px and higher and the 'full' size, so 400x200, will be used 767 and lower. I've…
Darren
  • 177
  • 2
  • 9
0
votes
1 answer

srcset inside multicolumn doesn't work at all, any way to make it choose best image

Hi i've got a multi column layout using the following CSS code .grid { column-width:260px; column-fill:balance; } Then I've got an image tag using srcset to specify 3 image variations
xmxmxmx
  • 409
  • 1
  • 6
  • 16
0
votes
1 answer

Non working srcset

I am trying to learn how to use responsive images. So I made a simple page to try to practice using srcset with sizes. There are 4 images maldives-3220702_1920.jpg is the normal one. The other 3 have a number on them so I can see when the images…
Mr-gray
  • 17
  • 3