The HTML picture element explained [ Images on the web part 3 ]

The HTML picture element explained [ Images on the web part 3 ]

Kevin Powell

5 лет назад

58,564 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Gloryjaw
Gloryjaw - 10.11.2023 11:52

The frozen recording really messed up the video 😒

Ответить
Transparent
Transparent - 22.10.2023 17:17

I didn't find the video on automating images. Was it ever released or am I just blind?

Ответить
tobysuperstar
tobysuperstar - 15.08.2023 16:42

Thanks for sharing Kevin, you're quickly becoming my go-to person for all questions related to html & css. Quick question as I delve into images - given that this video is now about 4 yrs old, are there any major changes to your recommendations here? I'd also love to hear your take on how to incorporate avif images as browser compatibility grows.

Ответить
Carsten Berggreen
Carsten Berggreen - 10.08.2023 19:08

@kevin - am I wrong or did you forget to add a comma in the small srcsets ? or is the comma optional? thanks for yet another great tutorial... I still struggle to decide if I think Apple's X2 and X3 is a stupid solution or not... to me, it just generates a ton of extra wasted bandwidth for mobiles...

Ответить
Traverse the DOM
Traverse the DOM - 11.02.2023 13:16

The way you explain things is so clear and easy to understand

Ответить
Dev Life
Dev Life - 30.01.2023 07:41

Excellent Video on proper way optimize image!
I wish I had ton of money to visit your country and see you to show how much I respect you.

Ответить
Denzel Braithwaite
Denzel Braithwaite - 20.08.2022 14:53

The first minute was already very helpful, thanks!

Ответить
Vo Thai Son
Vo Thai Son - 02.07.2022 09:01

Note to newbies: don't make mistake like i did. The url in the srcset attribute must be escaped. Because it simply is not a url. 😭

Ответить
<Technophile />
- 10.01.2022 16:24

Hi, Kevin Powell. Can you also explain figure and figcaption? I couldn't understand what they really meant. Thanks in advance...

Ответить
Yaprak Sıla Öztürk
Yaprak Sıla Öztürk - 03.11.2021 17:41

Thank you so much for this! Our lecturer didn't explaine this topic in detail so this is very helpful!

Ответить
Я Молодец
Я Молодец - 15.08.2021 03:27

Why does a picture tag behave as a div if its parent has 'display: flex'? I thought that picture is just an invisible wrap to keep sources.

Ответить
Royer Adames
Royer Adames - 07.08.2021 20:42

What happend to the automation video?

Ответить
What The Function
What The Function - 11.07.2021 22:49

I dont like this

Ответить
Bobby Bundlez
Bobby Bundlez - 06.07.2021 23:16

pretty shit part for it to freeze bro LOL. but good vid series thanks

Ответить
SoHardToBeMe
SoHardToBeMe - 07.06.2021 19:33

What mic is that, I'm wearing beadphones and i thought they werent on wtf lol

Ответить
Julián Zamt Profe
Julián Zamt Profe - 03.06.2021 23:52

Is the 4th part available? Thanks for the great job!

Ответить
Damian Demasi
Damian Demasi - 28.04.2021 05:04

Great tutorial, thanks!

Ответить
Elda
Elda - 17.03.2021 22:21

I'm still confuse between the difference srcset in pictures tag and srcset in img tag, isn't in img tag you could also do media query?

Ответить
Hussein Kizz
Hussein Kizz - 10.02.2021 11:23

Thanks so much, Powell, but make us an updated series on this in 2021, including react application, please!

Ответить
SharakPL
SharakPL - 22.01.2021 16:58

It's hard to watch because of all the lags and freezes through whole video. Anyway thanks for great explanation.

Ответить
Raminda Subhashana
Raminda Subhashana - 10.01.2021 14:25

Is this works with all device types?

Ответить
thescooble
thescooble - 15.10.2020 13:30

I find it easier to learn one thing at a time, so mixing in changing grid displays at different screen sizes makes it more difficult to understand when I haven't fully grasped the functionality of grids. But other than that, excellent!

Ответить
Russell Driver
Russell Driver - 10.09.2020 10:06

Hi Kevin, is there a similar approach for video tags for video back grounds, so a larger videos play on a desktop but a trimmed version plays on a mobile?

Ответить
NOUM
NOUM - 26.08.2020 08:15

Is there a Wysiwyg editor out there that supports this?

Ответить
namakudamono
namakudamono - 23.08.2020 10:54

Great video Kevin, thank you for the clear explanation!
Do you have any tips for reducing cumulative layout shift when using responsive images? For example, how can we reserve space for an image to load into, if the size of the image will change depending on the window size or device, etc.?

Ответить
Muhammed Özalp
Muhammed Özalp - 13.08.2020 23:51

Thank you very much, Kevin.
It would be very good if you have time for the 4th video about automation.
And I am wondering if you can please talk about lazy-loading with picture or srcset element on that video.

Ответить
Guy Harwood
Guy Harwood - 28.07.2020 12:33

Thank you so much, I really enjoy learning from you. 👍😀

Ответить
Chris Lloyd
Chris Lloyd - 03.07.2020 01:08

Is there a reason the picture element is the only element to support webp currently? Will the img tag support webp in the near future or will the img element without the picture element slowly become obsolete in favor of the picture element.
Wondering if it is worth using the picture element over stand alone img element for future proofing even in situations where you don't need to change the images being displayed.

Ответить
Kamal Ahmed
Kamal Ahmed - 24.06.2020 22:53

I have learned a very important thing from this video. I faced an issue a few days back. I used webp images for better compressor and pagespeed score. Then I tested with Safari on Mac and iOS. No image was displaying. So, I reverted to jpg images. But in this video, I learned how to use webp and using jpg or other images as fallback. I wish I knew you'd trick I few days ago. Thank you so much for this valuable video. ❤️ I have subscribed to your site for your new CSS course. I hope it will be a deep and advanced CSS course that will remove all confusion in CSS. 😊

Ответить
tucotuco
tucotuco - 11.05.2020 05:29

When should i use the sizes attribute?

Ответить
Oweno
Oweno - 09.05.2020 16:44

How can I use this in WordPress?

Ответить
Devs Dojo
Devs Dojo - 27.01.2020 10:48

What if I add srcset attribute on the img tag along with all other stuffs?

Ответить
Nathan Cornwell
Nathan Cornwell - 28.12.2019 00:17

So, is there a way to target a specific image depending on which one is loading in??

Ответить
Ar Am
Ar Am - 26.12.2019 22:23

Other than using the built-in devtools responsive mode, how do you set up your testing environment when you need to debug real on real devices *locally*? (I know there are tools like ngrok, but when you don't want to disclose your code they might not be an option.) Would you care to record a video about that?

Ответить
Ilidan85
Ilidan85 - 16.11.2019 20:59

Unfortunately if you put 2 same scrset files: webp and jpg in Safari it won't just skip webp and display jpg. It will show nothing. Any ideas how to solve it?

Ответить
Max de Wilde
Max de Wilde - 11.10.2019 21:40

Well explained and very useful!

Ответить
Anonymous User
Anonymous User - 12.09.2019 08:07

Thank you Kevin! It solved a great problem here.
In case I need to use multiple images when using with style attribute and background-image property, how do I do that?
Also, could you make a video covering all the basics to load webpages faster?

Ответить
Learning Dev
Learning Dev - 04.09.2019 13:30

It would be really awesome to see the 4th video in this series that you mentioned. About the automation of srcset etc. Thanks for your awesome content!

Ответить
Joel D Canfield
Joel D Canfield - 05.08.2019 03:06

Excellent. Clarifying: srcset is enough if we just want to serve different sized images to be responsive, but the picture element allows us to have multiple sources each with srcset, allowing either finer control over size, or if desired, different images (cropped/adjusted or just plain different) in addition to serving the appropriate size of each.


Or did I miss the point?

Ответить
WalterGP
WalterGP - 02.07.2019 22:07

Excellent series of videos!, great work Kevin. I have a question regarding the mixing of media queries and the width on the srcset. how is it that 534w will trigger if we are inside a (min-width 960px) media query?... related to the large img srcset. (same for the medium jpg tho).

Ответить
PRZEŚWIETLENI
PRZEŚWIETLENI - 30.05.2019 15:00

I love your movies so much! Definitly goes to fav

Ответить
J Calderon
J Calderon - 18.04.2019 01:31

Dude, you rock!

Ответить
Youssef kanouni
Youssef kanouni - 05.03.2019 12:05

Thans for the qualité of information 🔥🔥

Ответить
Chunky Chunk
Chunky Chunk - 23.02.2019 00:55

So we need to have an <img> element within the <picture> element, but does the <img> element need to define a "src" ? Can we write "<img src="">" since the sources will be overwriting the image src anyway?

Ответить
Michael Rosa
Michael Rosa - 28.12.2018 10:32

Hi Kevin, in Chrome the inspector shows you the currentSrc, much easier then finding files in network tab.

Ответить
Manoj Shaw
Manoj Shaw - 20.12.2018 20:21

Sir one question plz reply me.
Is there any background tag in html?

Ответить
TechXSoftware
TechXSoftware - 20.12.2018 13:11

Is this better than Ajax through?

Ответить