element.animate(
[
{ transform: 'scale(1.25)', opacity: 1},
{ transform: 'scale(1)', opacity: 1, offset: 0.25 },
{ transform: 'scale(1.05)', opacity: 1, offset: 0.3},
{ transform: 'scale(0.85)', opacity: 0}
],
2000
);
$count = 1;
$v = 4;
<picture>
<source srcset="path/to/image.webp" type="image/webp">
<img src="path/to/image.jpg" alt="Image alt">
</picture>