I just wanted to know if <img src="">
hurts performance in asp.net? If yes, then how, and what is a better solution?
EDIT
I would like to add some more details:-If developer miss the src tag or if the image is missing from the server(for example a.jpg is missing from the server)
<img src="Images/a.jpg">
EDIT
I asked this question because recently I faced a problem in which our Page do double postaback just because of fav.ico was missing from the server.
Sites that use too many images, or have images that are too large, have longer loading times. This can slow down your entire page, irritating visitors and actually hurting your site's ranking in online search results.
SRC (Source) The SRC attribute specifies the URI for the image to be embedded. Its syntax is the same as that of the HREF attribute of the <A> tag.
next/image changes the image to WebP format when you request. WebP format reduces the size of the image while keeping the quality. It also makes lazy loading which is great if the user doesn't see your entire page.
For example, if a web page has an image that the user has to scroll down to see, you can display a placeholder and lazy load the full image only when the user arrives to its location.
Yes, as you need another request to get the image. ;-)
IE6 won't respect content expiration headers when <img>
is inside iframe.
It may be better to use a background image (CSS) with a sprite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With