This feature is great! No more optimizing images separately. Angular improves with each release.
@CodeShotsWithProfanis2 жыл бұрын
Angular 14 and 15 brought up so many great features! Glad you liked it!
@boriscissoko28652 жыл бұрын
very powerful feature in angular... Thanks for your explanation
@ranjanadeore29572 жыл бұрын
Thank you sir for another great explanation. Eagerly waiting for your next video.
@CodeShotsWithProfanis2 жыл бұрын
Thanks!! I will upload new content very soon :)
@osasiria27282 жыл бұрын
Thanks for sharing this knowledge.
@hodapro3394Ай бұрын
can i use this in angular 16 ?
@CodeShotsWithProfanisАй бұрын
yeah! :)
@IbrahimElmourchidi2 жыл бұрын
Thanks a lot for your simple explanation and effort
@CodeShotsWithProfanis2 жыл бұрын
Glad you liked it! :)
@madeOfClay992 жыл бұрын
I think in order to use the ngSrc is also mandatory to define a width and height, I can't just use as , and the height and width should be number values, it doesn't work with values such as 'auto' or using 'rem' units...
@CodeShotsWithProfanis2 жыл бұрын
Yes correct, the width and height are mandatory for the CLS optimization web.dev/optimize-cls/#images-without-dimensions
@tsenguun2 жыл бұрын
Not mandatory. You can use fill attribute and use a container that has width and height. It can be dynamic as well. Just make sure you have position relative on the container
@CodeShotsWithProfanis2 жыл бұрын
@@tsenguun can you reproduce that and send a code example? Curious to see it working with the image directive
@niconel49412 жыл бұрын
Thank you! Having this exact problem right now.
@CodeShotsWithProfanis2 жыл бұрын
I hope this can solve your problem!
@stukituk2 жыл бұрын
Thanks for this video
@GrAnChA19882 жыл бұрын
Nice video!!
@carloszm74942 жыл бұрын
Thanks, fantastic
@virajjoshi75692 жыл бұрын
Is there any way I can perform this in Angular 11
@CodeShotsWithProfanis2 жыл бұрын
There is no Angular standard way to do this. You can achieve the same by using the img directives One option is to use the lazy attribute developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading
@ahm2004ad2 жыл бұрын
You are great. 😉 I have suggestion for the next video which is global error handling with logging at the backend ( http errors or client side error)
@CodeShotsWithProfanis2 жыл бұрын
That's a great suggestion! Noted ;)
@_Greenflag_ Жыл бұрын
Well sure, not bad. But for images, you should also resize them and compress them. You can go from a 2Mo image to 200Ko.
@SonuSindhu2 жыл бұрын
Great addition. But replacing the image is still not compatible...