Reputation: 1443
Ignoring the size of each GIF, here are 2 ways in which I am trying to load GIFs
Will these two cases affect the performance due to rendering, if so how much performance gain can we expect by decreasing the size of the images?
Note: These are the dimensions of the elements and I am not tweaking the actual size of the GIFs
Upvotes: 3
Views: 949
Reputation: 8477
Resizing images on the browser does affect performance when it comes to rendering.
From tips for best performance,
Don't use a bigger image than you need just because you can set the width and height in HTML. If you need then your image (mycat.jpg) should be 100x100px rather than a scaled down 500x500px image.
About how much it affects, it depends on how much resize you apply, and how many images you resize on one page.
Ah, found the link I was trying to remember :
Long image decoding, unnecessary image resizing, heavy animation and data processing can all lead to dropped frames, which reduces the frame rate, resulting in janky pages
Upvotes: 3