Stackoverflow users
When creating an html5 application / website for situations such as an image gallery where a large number of images are displayed sequentially or at the same time in the browser, is the use of a canvas element used?
While we are only talking about the representation of the image, does it make sense to use a canvas and draw an image on it instead of using the DOM <img> tag element? There will also be some manipulations with images, such as CSS3 transforms / moving / scaling / zooming and gesture recognition (drag and drop, touch / tap, possibly a pinch, etc.), which, as far as I know, apply to canvas as well and to img tags.
It would also be important to keep as much "html5" as possible, as well as consider performance. For example, it would be important if in the future the canvas element will be increasingly used and optimized by browsers, and this also matters if, for now, <img> is much faster.
Since we are considering developing a universal html5 application running on desktop computers as well as on mobile devices, performance and speed are a very important factor. However, tests comparing the canvas and <img> were intended for most browsers in javascript format. In this case, animation is not as important as memory consumption and overall performance.
Are there any resources / studies on this particular aspect?
source share