I am a bit confused about this. For displaying images in my HTML page, embedding image code is good in HTML img tag (using Data URL technique) or giving a link to that image file will be more better (the traditional way)? If anyone can tell me the advantages and disadvantages of both of them in a comparative manner than it will be a great help.
Data URL embedding:
Image link:
In general, I suggest to use links for larger images (photo, layout elements, big icons) and for images that can change over time. Use Data URL only for very small icons.
I have to say you can avoid the first two Data URL problems (long code and maintainable) generating Data URL from a physical image file, using a server-side language (PHP for example) for encoding.