How to make images responsive using srcset and size attribute??

I have tried using srcset but it isnt working the demo link line 37 https://github.com/kvandana451/Assorted-Cards-images/blob/main/index.html
GitHub
Assorted-Cards-images/index.html at main · kvandana451/Assorted-Car...
A card layout with various sizes, containing images and/or text. - kvandana451/Assorted-Cards-images
321 Replies
ἔρως
ἔρως4w ago
i have no idea why this doesn't work. do you have any way to test this with a real device?
ἔρως
ἔρως4w ago
i tried this on my android 9 phone, and i have no idea why it doesn't work
No description
ἔρως
ἔρως4w ago
it should work
Vandana
Vandana4w ago
Trying. ITS WORKING ACTUALLY
ἔρως
ἔρως4w ago
how did you checked it?
Vandana
Vandana4w ago
Properties and then currentSrc which i have highlighted
No description
ἔρως
ἔρως3w ago
that is interesting 🤔 this begs the question: is this another bug where the image is loaded but isn't showing in the network?
Vandana
Vandana3w ago
No now it is showing in the network tab as well
ἔρως
ἔρως3w ago
🤔 i have no clue of what is going on
Vandana
Vandana3w ago
As disscussed in the above, the images seemed too be quiet big, so as suggested we used graphic tools to reduce the file size of the image and display those images depending on the screen size using srcset ,it was not loading in the network tab ,but now those images are loading fine as per the varying screen size we can see the change in images in the network tab .
Vandana
Vandana3w ago
GitHub
GitHub - kvandana451/Assorted-Cards-images: A card layout with vari...
A card layout with various sizes, containing images and/or text. - kvandana451/Assorted-Cards-images
Vandana
Vandana3w ago
I have tried to reduce the file size now you can see the change in the file size.
Kevin Powell
Kevin Powell3w ago
One thing that can muck up testing with srcset is, if the page loads in the larger one first, it won't load in a smaller one later when the viewport gets smaller. There's no need to change things at that point, because it already has a higher quality image. But yeah, it seems to be working fine now 🙂
Vandana
Vandana3w ago
But i feel only the image file size has been reduced but still images appear gigantic
Kevin Powell
Kevin Powell3w ago
What do you mean? Like, right now, the rendered images are basically in line with what you want, I think? Like, at small screen sizes, it's loading in the 375 x 250 version of the image. The rendered size is how big it is on the page, the intrinsic size is the actual size of the image.
No description
Vandana
Vandana3w ago
The rendered images are inline since the height is 100% i have set. At small screen size its loading 238 x 192 (i have resized it using graphic tools to reduce the bandwidth and file size) So to say overall evenn though i have reduced the file size, at 320 px still the images are gigantic
Kevin Powell
Kevin Powell3w ago
I don't understand how the image is gigantic at 375 x 250. It is bigger than rendered size, but it's not that much bigger? I mean, if you wanted, you could create 10 versions, each one slightly bigger than the next, but it would be a waste of time. The image file size is 7kb right now. If you made it 250 wide instead, it would be ~5kb?
Vandana
Vandana3w ago
Exactly. looks gigantic for the users. You can have a look at the images at all screen sizes ..
Kevin Powell
Kevin Powell3w ago
Well, that's more on the layout than anything else.
Vandana
Vandana3w ago
Meaning the given design?
Kevin Powell
Kevin Powell3w ago
Yup. It's less about the actual physical size of the image, but the aspect ratio of it, and how much space is available to it.
Vandana
Vandana3w ago
https://codepen.io/abcretrograde/pen/rKOgWw from this i have downloaded the image and implemented .They look so small here.the same imags after i implementing they are gigantic
Stephen Lee
CodePen
Assorted cards & images (CSS Grid + BEM)
A card layout with various sizes, containing images and/or text. Using BEM to try to keep the code organized (and to help keep the design consistent)....
ἔρως
ἔρως3w ago
i actually didn't knew this, but can confirm that starting with mobile size on the desktop makes it work properly
No description
ἔρως
ἔρως3w ago
but doesn't explain this... maybe it's one of the weird viewport vs real resolution weirdnesses?
Vandana
Vandana3w ago
Its working actually what is the issue you are facing?? even for large screen as well.....
ἔρως
ἔρως3w ago
i didn't check again, but i was having issues testing it but i did what kevin said and, on desktop, it loads the 325px version or 350 or whatever
Vandana
Vandana3w ago
but for mobile it loads less than that
ἔρως
ἔρως3w ago
i will test again
Vandana
Vandana3w ago
yes pls
ἔρως
ἔρως3w ago
it does load the 375px version, however ... img1-375.webp is 1122x750px
No description
No description
ἔρως
ἔρως3w ago
wait, i mixed it with image 1 - which is the wrong one
Vandana
Vandana2w ago
could i get an update on this
ἔρως
ἔρως2w ago
thats my update: the 375px image doesnt have 375 pixels of width that probably is confusing the living hell out of chrome
Vandana
Vandana2w ago
its just the naming for an image not 375px width
ἔρως
ἔρως2w ago
here's the problem: you're saying it is a 375px wide image, which isn't the reality
No description
Vandana
Vandana2w ago
375w is not the width its the media query
ἔρως
ἔρως2w ago
it's the intrinsic width of the image
Vandana
Vandana2w ago
true
ἔρως
ἔρως2w ago
but the real size is 1133 or something
Vandana
Vandana2w ago
yea we have used graphic tools to reduce the file size this was one among the process explained
ἔρως
ἔρως2w ago
yes, but you downloaded the wrong one
Vandana
Vandana2w ago
there is no other way apart from downloading from inspect
Vandana
Vandana2w ago
No description
ἔρως
ἔρως2w ago
you downloaded the wrong one from squoosh.app
Vandana
Vandana2w ago
but then i have checked the file size it was less then the original that only i have downloaded
ἔρως
ἔρως2w ago
because you downloaded a webp the original was a jpeg, which was smaller but you didn't download the one with the low resolution
Vandana
Vandana2w ago
only one img was jpeg rest some were webp only i have downloaded the one which has low file size is that wrong?
ἔρως
ἔρως2w ago
yes and no i explained why
Vandana
Vandana2w ago
how did you find out this??
ἔρως
ἔρως2w ago
because of the resolution of the image open it in a new tab and it will show the resolution
Vandana
Vandana2w ago
but then in squoosh app i have set the resolution less than 50% depending upon the clarity only
ἔρως
ἔρως2w ago
yes, but you downloaded the wrong one, and you're telling chrome that it is a size that it actually isn't
Vandana
Vandana2w ago
ohh! again need to repeat this process
ἔρως
ἔρως2w ago
yes, and make sure you download the correct one HOWEVER the current img1-375.webp can be used instead of the jpeg BUT!!!! re-do all the process by using the jpeg image, to avoid losing too much quality
Vandana
Vandana2w ago
how to check whether i am downloading the correct one for safety ,because again i dont wanna redo
ἔρως
ἔρως2w ago
only do changes on the right side of squoosh.app and leave the left side in "original" at all times
Vandana
Vandana2w ago
yea same only i had done
ἔρως
ἔρως2w ago
you did on both sides
Vandana
Vandana2w ago
and click on the download blue icon at the bottom
ἔρως
ἔρως2w ago
yes
Vandana
Vandana2w ago
you mean instead of the original given jpeg image use this one(img1-375) for large screen?
ἔρως
ἔρως2w ago
im saying to use that image for the full size one, on the website, instead of the jpeg one
Vandana
Vandana2w ago
you mean instead of the original given jpeg image use this one(img1-375) for large screen? thats what i ment
ἔρως
ἔρως2w ago
yes
Vandana
Vandana2w ago
meaning keep the setting for those images at the left side for jpeg,and new image format in jpeg only?
ἔρως
ἔρως2w ago
no meaning "don't use the jpeg image on the website"
Vandana
Vandana2w ago
thats what left side any format of the given image ,right side jpeg
ἔρως
ἔρως2w ago
left side is webp
Vandana
Vandana2w ago
but some are jpeg
ἔρως
ἔρως2w ago
yes, but you can convert them later on
Vandana
Vandana2w ago
No description
Vandana
Vandana2w ago
it comes back to this point only
ἔρως
ἔρως2w ago
you're encoding it to a jpeg
Vandana
Vandana2w ago
yes whats the issue
ἔρως
ἔρως2w ago
i don't get the issue you can just change it
Vandana
Vandana2w ago
change it to what?
ἔρως
ἔρως2w ago
webp
Vandana
Vandana2w ago
oh but then it doesnt solve the pbm
ἔρως
ἔρως2w ago
im so confused now what are you trying to do?
Vandana
Vandana2w ago
as you said
ἔρως
ἔρως2w ago
is the original image a webp?
Vandana
Vandana2w ago
ya
ἔρως
ἔρως2w ago
do you need a smaller version of it?
Vandana
Vandana2w ago
ya becuase you stated the images are very gigantic
ἔρως
ἔρως2w ago
you're disturbing don't hijack questions just to ask to answer your question that's 2 rule breaks in 1
Vandana
Vandana2w ago
you have explained in the showcase section the same procedure i followed
ἔρως
ἔρως2w ago
set the output to webp, then resize to 50%, play around with the quality and then export
Stefano
Stefano2w ago
no need to be aggressive your question will be answered ether way...
ἔρως
ἔρως2w ago
im not being aggressive 🤔
b1mind
b1mind2w ago
He is right though you are the one being rude, please take time to consider how you are behaving.
ἔρως
ἔρως2w ago
is it the lack of "please" and "thank you" that sounds aggressive? 🤔
Stefano
Stefano2w ago
just nvm. good luck on your query apologies
Vandana
Vandana2w ago
i guess this is pointing out to me
ἔρως
ἔρως2w ago
no, it was to me i pointed out he's disturbing the flow of this post, and that by asking us to answer his question he's hijaking this and breaking 2 rules
Vandana
Vandana2w ago
first of all this is leading to a big confusion.
ἔρως
ἔρως2w ago
yes, that's why i said he's disturbing
Vandana
Vandana2w ago
Cool. This was done .
ἔρως
ἔρως2w ago
then that's it
Vandana
Vandana2w ago
and this was the status
ἔρως
ἔρως2w ago
alright, 1 second
Vandana
Vandana2w ago
sure
ἔρως
ἔρως2w ago
i will use this image as an example
No description
Vandana
Vandana2w ago
go ahead
ἔρως
ἔρως2w ago
i open it in squoosh.app
No description
Vandana
Vandana2w ago
okay
ἔρως
ἔρως2w ago
resized it and picked these settings
No description
No description
ἔρως
ἔρως2w ago
then just click the blue button on the bottom right side
Vandana
Vandana2w ago
exactly
ἔρως
ἔρως2w ago
that's it BUT
Vandana
Vandana2w ago
but what?
ἔρως
ἔρως2w ago
in this case, since it is a jpeg image, just export as a webp image, and you should save some space automatically
Vandana
Vandana2w ago
ya try implementing the same in your system
ἔρως
ἔρως2w ago
i've messed about with some settings, and got this
No description
No description
ἔρως
ἔρως2w ago
but if you just leave it at 75 quality, and convert to webp, you should save 20-30%
Vandana
Vandana2w ago
yea
ἔρως
ἔρως2w ago
that should be it
Vandana
Vandana2w ago
i too followed the same as per your instructions
ἔρως
ἔρως2w ago
then you should have 2 webp images
Vandana
Vandana2w ago
how original to new webp image one only .. may be for diff diff screen sizes you are saying?
ἔρως
ἔρως2w ago
yes, one with the same size as the original version, and one that's 50% the resolution of the original
Vandana
Vandana2w ago
yea check the code its there as you say try reproducing in your system
ἔρως
ἔρως2w ago
your image has -625 in the name, then you say it is 560px wide, but it's actually 617px of intrinsic width
No description
ἔρως
ἔρως2w ago
wait, no, that's still the wrong size nevermind.... i am wrong so, chrome does this weird thing where it shows the full size on the url of the half size you are correct: it is 560px, but the name of the file has -625, which will confuse you in the future you should fix that
Vandana
Vandana2w ago
just for urge definetly first i want to get confirmation from your end whether i am doing right
ἔρως
ἔρως2w ago
you're 90% there you're still using the original jpeg, instead of the full-size webp
Vandana
Vandana2w ago
where pls point out
ἔρως
ἔρως2w ago
<img srcset="/images/img4-625.jpg 560w,/images/img4.jpeg 1120w" sizes="(max-width: 1220px) 560px, 1120px" src="/images/img4.jpeg" alt="Scenary" class="img-four"> the 1120w path and the src path both point to the jpeg
Vandana
Vandana2w ago
src and 1120w point to original version of the image
ἔρως
ἔρως2w ago
yes, but should be to a full-size webp image, which saves some space
Vandana
Vandana2w ago
again the squoosh app? to convert to webp
ἔρως
ἔρως2w ago
yes, but you just change it to webp, and don't resize
Vandana
Vandana2w ago
god!! but aleast at small screen sizes what is happening?
ἔρως
ἔρως2w ago
it is correct
Vandana
Vandana2w ago
images are gigantic only na for small screen. this is for large screens .got it
ἔρως
ἔρως2w ago
yes, it is remember: it's only worth it to load the bigger image when the size in css starts to make the image look really bad which should be at about the resolution you have there yeah, about 1220px maybe more, since the image takes 50% of the screen size only
Vandana
Vandana2w ago
what happens if it is of other formats they are full fleged only only for space i need to make the original version of image to webp?
ἔρως
ἔρως2w ago
yes well, avif looks very horrible, in my opinion it's a video format, and it loses a lot of "texture" it's great in many situations, but ...
ἔρως
ἔρως2w ago
png will explode the size of the image into ridiculously huge sizes
No description
ἔρως
ἔρως2w ago
jpegxl will reduce the size of the image by about 30% - but only iphones, ipads and macs support it for now with the right tool, it can be encoded to and from jpeg without losing any quality
No description
ἔρως
ἔρως2w ago
the rest is just different encoders for jpeg, webp and png
Vandana
Vandana2w ago
ok ok
ἔρως
ἔρως2w ago
i suggest webp because it (sometimes) reduces a little more than jpegxl and is supported in most/all browsers, despite being super annoying
ἔρως
ἔρως2w ago
you still have a jpeg image
No description
ἔρως
ἔρως2w ago
and another one
No description
ἔρως
ἔρως2w ago
and another one ...
No description
ἔρως
ἔρως2w ago
you should enable the file extensions on windows
Vandana
Vandana2w ago
this is for the small screen sizes na output should be in jpeg
ἔρως
ἔρως2w ago
no, it should be in webp because it's smaller
Vandana
Vandana2w ago
..... small screen sizes was set to jpeg.now again should modify to webp?? infact large screen are set to webp only..
ἔρως
ἔρως2w ago
yes, everything should be webp
Vandana
Vandana2w ago
..
ἔρως
ἔρως2w ago
it's gross, i know, but it should be webp
Vandana
Vandana2w ago
now pls go through
ἔρως
ἔρως2w ago
still has jpeg
No description
Vandana
Vandana2w ago
wait a bit it isnt deployed yet
ἔρως
ἔρως2w ago
alright
Vandana
Vandana2w ago
check
Vandana
Vandana2w ago
No description
ἔρως
ἔρως2w ago
now it is webp
Vandana
Vandana2w ago
whats the result now? what to conclude images are still big?
ἔρως
ἔρως2w ago
no, no the media query needs some tweaking, but it is working properly
Vandana
Vandana2w ago
what next?
ἔρως
ἔρως2w ago
the media queries need tweaking, to take advantage of the small images lets take the image 4 as an example img4-625.webp is 560 pixels wide, and img4.webp is 1120 pixels wide at which resolution(s) the css size of the image is larger than 560px?
Vandana
Vandana2w ago
no size as such here is the proof
Vandana
Vandana2w ago
Stephen Lee
CodePen
Assorted cards & images (CSS Grid + BEM)
A card layout with various sizes, containing images and/or text. Using BEM to try to keep the code organized (and to help keep the design consistent)....
ἔρως
ἔρως2w ago
that's not true at 1429px, it jumps to 573px and at 1428px, it's 669.94px
Vandana
Vandana2w ago
oh i see
ἔρως
ἔρως2w ago
it's what the browser says
No description
ἔρως
ἔρως2w ago
and at 1180 it goes up to 719px
No description
ἔρως
ἔρως2w ago
in this specific image, i would set the max-width of the media query to 940px
No description
No description
ἔρως
ἔρως2w ago
all other sizes get the original image
Vandana
Vandana2w ago
944 accurately.. has 561
ἔρως
ἔρως2w ago
940 has 599.64 pixels wide also, 940 is a "round" number, without that nasty 4 at the end when calculating sizes, the browser rounds up, but, again, 940 is a pretty number
Vandana
Vandana2w ago
okay okay cool
ἔρως
ἔρως2w ago
but you can use 944 if you want
Vandana
Vandana2w ago
ok then for img1-675 it is 2821px wide
ἔρως
ἔρως2w ago
yuck, another non-round number 2820px is enough by doing this annoying process, you will save quite a lot in terms of bandwidth
ἔρως
ἔρως2w ago
currently, you're downloading about 879kb in images, which is quite a lot for the current website
No description
ἔρως
ἔρως2w ago
i remember it was 1.2mb, which means that you saved about 30% of space
Vandana
Vandana2w ago
actually prior it was more than this i feel initially in one of your explaination.
ἔρως
ἔρως2w ago
i have a faint idea it was 1.2mb
Vandana
Vandana2w ago
am i right na? great memory exactly
ἔρως
ἔρως2w ago
im surprised i remembered
Vandana
Vandana2w ago
na i have troubled that much and irriated that is why
ἔρως
ἔρως2w ago
irritated because of this process? it is a very annoying process, i know
Vandana
Vandana2w ago
i meant you remember its 1.2mb because i have troubled by my queries and irriated you .
ἔρως
ἔρως2w ago
oh, im not irritated
Vandana
Vandana2w ago
thanks for your patience now completed with tweaking media queries kindly check
ἔρως
ἔρως2w ago
well, i will annoy you, but ... i think you should swap the order in which the images are loaded
No description
ἔρως
ἔρως2w ago
so it loads the low quality one and then loads the high quality one when it's bigger instead of this:
<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(max-width: 2820px) 561px, 1122px" src="/images/img1.webp" alt="Tower" class="img-one">
<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(max-width: 2820px) 561px, 1122px" src="/images/img1.webp" alt="Tower" class="img-one">
probably would be better to write this:
<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(min-width: 2820px) 1122px, 561px" src="/images/img1-625.webp" alt="Tower" class="img-one">
<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(min-width: 2820px) 1122px, 561px" src="/images/img1-625.webp" alt="Tower" class="img-one">
Vandana
Vandana2w ago
how do we get to know this? is my thinking right that at upto 2820 screen size it loads an img width of 561px which is called low qualtity,becuase the other remaining screen size has 1122px width image (termed as high quality ,because of its higher img widthhh???) both means the same,,,, if i am write in my explaination then,,<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(max-width: 2820px) 1122px, 561px" src="/images/img1-625.webp" alt="Tower" class="img-one">
ἔρως
ἔρως2w ago
instead of max-width, it's min-width basically, yes first, the lower resolution image, and if the screen is bigger enough it loads the original image
Vandana
Vandana2w ago
first equation seems correct . lower resolution of img till 2820 screen size,then for large screens more than that it has high resoultion img i.e1122px
ἔρως
ἔρως2w ago
yup, that's it
Vandana
Vandana2w ago
then why you wrote equation2
ἔρως
ἔρως2w ago
what do you mean?
Vandana
Vandana2w ago
you got confused here. this sentence is right ???
ἔρως
ἔρως2w ago
yes, that is correct
Vandana
Vandana2w ago
then first eq is right .. not the second one .
ἔρως
ἔρως2w ago
no, because you want to show the full image only starting at 2820 pixels and under that, you want to show the 50% size image
Vandana
Vandana2w ago
its anyway one and the same only it means
ἔρως
ἔρως2w ago
no, the logic has to be swapped you have to change from max-width for the low-res, to min-width for the original
Vandana
Vandana2w ago
whats the difference still i am not getting ,its anyhow same help me to understand this.
ἔρως
ἔρως2w ago
the difference is that one will load the low-res image and the other loads the original
Vandana
Vandana2w ago
ya bu then i am getting confused about max and min width media query .. <img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(max-width: 2820px) 561px, 1122px" src="/images/img1.webp" alt="Tower" class="img-one"> here also one will load low resolution image and the other the high resolution after 2820 screen size
ἔρως
ἔρως2w ago
that might work as well, try it
Vandana
Vandana2w ago
tehn before it was that only look here
ἔρως
ἔρως2w ago
i didn't notice
Vandana
Vandana2w ago
Ahhh!
ἔρως
ἔρως2w ago
b?
Vandana
Vandana2w ago
what?
ἔρως
ἔρως2w ago
you said "ahhh", i said "b"
Vandana
Vandana2w ago
meaning
ἔρως
ἔρως2w ago
i don't know why you said it a = 1st letter of the alphabet
Vandana
Vandana2w ago
it took lot of time to explain it to you i guess since sday
ἔρως
ἔρως2w ago
yeah, because i wasn't noticing any differences
Vandana
Vandana2w ago
all images being the same right
ἔρως
ἔρως2w ago
no, you don't use code blocks makes everything look the same, and very hard to read
Vandana
Vandana2w ago
nopes now ill start to use.
ἔρως
ἔρως2w ago
thank you
Vandana
Vandana2w ago
? is this becuase of the difficulty in reading the code
ἔρως
ἔρως2w ago
no, it's because it's better for old browsers or browsers without srcset support, it loads the low quality image by default
Vandana
Vandana2w ago
i hope this is correct
ἔρως
ἔρως2w ago
it seems correct
Vandana
Vandana2w ago
seems correct and correct there is a difference.
ἔρως
ἔρως2w ago
yes, and the difference is that it isn't tested
Vandana
Vandana2w ago
No description
Vandana
Vandana2w ago
correct or seems correct?
ἔρως
ἔρως2w ago
correct
Vandana
Vandana2w ago
thanks a ton big relief
ἔρως
ἔρως2w ago
you're welcome
Vandana
Vandana2w ago
but then a doubt
ἔρως
ἔρως2w ago
ask it
ἔρως
ἔρως2w ago
by the way, 4 and 8 need a look
No description
ἔρως
ἔρως2w ago
also, your 978kb website is just 356kb now
Vandana
Vandana2w ago
good right?
ἔρως
ἔρως2w ago
however, for mobile, it's loading the full size images
No description
Vandana
Vandana2w ago
ἔρως
ἔρως2w ago
i know
Vandana
Vandana2w ago
but the link here is different.
ἔρως
ἔρως2w ago
well, the link is wrong in your github then
ἔρως
ἔρως2w ago
same issue anyways
No description
Vandana
Vandana2w ago
for mobile?
ἔρως
ἔρως2w ago
yes by the way, i just noticed you don't have lazy loading
Vandana
Vandana2w ago
No description
Vandana
Vandana2w ago
but then in currentSRC it shows the 50% image over here. One big issue .
ἔρως
ἔρως2w ago
on desktop or mobile?
Vandana
Vandana2w ago
everything is 100% resolution only webp image everything was working the day before only. both
ἔρως
ἔρως2w ago
try what i said for an image
Vandana
Vandana2w ago
min-width right?
ἔρως
ἔρως2w ago
yes
Vandana
Vandana2w ago
not working..
ἔρως
ἔρως2w ago
what's the code?
Vandana
Vandana2w ago
<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(min-width: 2820px) 1122px, 561px" src="/images/img1-625.webp" alt="Tower" class="img-one">
ἔρως
ἔρως2w ago
try adding a max-width to the 2nd size
Vandana
Vandana2w ago
No description
ἔρως
ἔρως2w ago
is it working?
Vandana
Vandana2w ago
no its being so frustrating,because by the day it was working well
<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(min-width: 2820px) 1122px,(max-width: 2819px) 561px" src="/images/img1-625.webp" alt="Tower" class="img-one">
<img srcset="/images/img1-625.webp 561w, /images/img1.webp 1122w" sizes="(min-width: 2820px) 1122px,(max-width: 2819px) 561px" src="/images/img1-625.webp" alt="Tower" class="img-one">
ἔρως
ἔρως2w ago
that should have worked
Vandana
Vandana2w ago
why did this broke suddenly? and even trying the same as the day before it isnt working.We had reached 90%,but now!!
ἔρως
ἔρως2w ago
i have no idea images are absolute hell
Vandana
Vandana2w ago
what can be done
ἔρως
ἔρως2w ago
honestly, at this point, i would stick with just the low quality images the website looks the same, until you check it on a 4k display
Vandana
Vandana2w ago
But then these many days of efforts will go in vain which i dont want too
ἔρως
ἔρως2w ago
no, they won't i mean, a tinsy tinsy bit, but that's ok
Vandana
Vandana2w ago
then now i need to remove srcset then
ἔρως
ἔρως2w ago
yes, and sizes but keep the src set to the low resolution version and that last part is where 99% of the work was done
Vandana
Vandana2w ago
what will happen by keeping ,we didnt achieve the desired result right. its disappointing me,Because with lots of patience you have taken up this and i am very grateful for your help and i dont wanna leave it like that only without achieving.
ἔρως
ἔρως2w ago
we achieved 50% and that 50% is the most important half
Vandana
Vandana2w ago
rest 50%??
ἔρως
ἔρως2w ago
not as important it will only affect 4k users
Vandana
Vandana2w ago
ohh! one more thing you stated about lazy loading i tried to use the attribute loading="lazy didnt achieve that as well
ἔρως
ἔρως2w ago
loading="lazy" decoding="async" add those to all images and the website should load just the few images at the top
Vandana
Vandana2w ago
Done with this but seems no change i felt as before only GIGANTIC doesnt happen all images loading at once only i checked the network tab
ἔρως
ἔρως2w ago
show me
Vandana
Vandana2w ago
No description
ἔρως
ἔρως2w ago
and you've set the lazy loading on all images?
Vandana
Vandana2w ago
yes yes
ἔρως
ἔρως2w ago
can you update the page then?
Vandana
Vandana2w ago
in the sense?
ἔρως
ἔρως2w ago
it didn't load as many as before, just 10 images
No description
ἔρως
ἔρως2w ago
the other 4 loaded later
No description
ἔρως
ἔρως2w ago
i think i know the issue
Vandana
Vandana2w ago
again?
ἔρως
ἔρως2w ago
No description
Vandana
Vandana2w ago
go ahead what is it?
ἔρως
ἔρως2w ago
this is your website before loading the images
ἔρως
ἔρως2w ago
and without css, this is it
No description
ἔρως
ἔρως2w ago
so, all images are shown at some point, because you don't have any critical css/above-the-fold css
Vandana
Vandana2w ago
critical css represents what? and what is above-the-fold-css
ἔρως
ἔρως2w ago
it's everything that's visible when the website loads all the content that's at the top, before the scroll why is this important? well, when the website loads, it needs to download the css to show the page properly but until the css is loaded, the website will be all ugly the critical/above-the-fold css is used to apply just enough styles so that the layout isn't all broken stuff like colors and things like that will be missing, but the website will sorta kinda resemble what you have
Vandana
Vandana2w ago
ohh then if we have that critical fold css then lazy loading might work?
ἔρως
ἔρως2w ago
it should, yes
Vandana
Vandana2w ago
then in my case critical fold-css is not required actually for what can i use since entire website is of images only
ἔρως
ἔρως2w ago
lazy loading won't always work, but it's fine it's less than 400kb, so, it's fine
Vandana
Vandana2w ago
okay then one another thing you told me to minify css but then i tried to research how to do it
ἔρως
ἔρως2w ago
yes, you can do it manually with any of the many online tools
Vandana
Vandana2w ago
CSS Minifier & Compressor | Toptal®
Use our CSS Minifier & Compressor tool to reduce CSS code size and make your website load faster. Get started for free now.
ἔρως
ἔρως2w ago
or, you can configure your build script to do it all that one is ok
Vandana
Vandana2w ago
how is this?
ἔρως
ἔρως2w ago
that's something im terrible at i recommend asking about it in a different post
Vandana
Vandana2w ago
but then a general question if i write the minified css ,how will the third person read my code?
ἔρως
ἔρως2w ago
why are you worried about that?
Vandana
Vandana2w ago
then the minified code is lines of code without spaces,forget third person i myself cant read that code
ἔρως
ἔρως2w ago
that's why you only do it when you deploy the site
Vandana
Vandana2w ago
okay Thanks for answering .
ἔρως
ἔρως2w ago
you're welcome
Vandana
Vandana2w ago
any other improvements fot this project?
ἔρως
ἔρως2w ago
no, that's it
Vandana
Vandana2w ago
i guess its been a long headace for you apologies.But i have learnt lot many things through this !Sincerly Thank you!!
ἔρως
ἔρως2w ago
you're welcome
Vandana
Vandana2w ago
https://discord.com/channels/436251713830125568/1253729651826757673 pls help me here as well i am stuck and no response might be that post isnt highlighted
ἔρως
ἔρως2w ago
it's against the rules to do that also, you've got plenty of people answering to you there
Vandana
Vandana2w ago
i understand, but then take a glance of it.may be it can save time for everyone
ἔρως
ἔρως2w ago
i will check later
Vandana
Vandana2w ago
sure thanks for the help and always responding.
ἔρως
ἔρως2w ago
you're welcome
Vandana
Vandana2w ago
Can you pls look into it.It would be a great help