

go to the Dashboard and find the article you just created.create an article with basic information such as a title (which we can change).The proper way to get this is to query the API for your articles or store the article ID when we create an article.īut yet again this is a one off project so all I need is to get the ID and hard wire it in.
#Timer countdown gif update#
To update a dev.to article you need the article ID. Now this one is also pretty straight forward. Putting that all together we end up with our GIF One quirk I found was that a duration of 100 is a second, I was expecting 1000 to be a second.

#Timer countdown gif how to#
The first part of the puzzle was creating an image sequence that I could later turn into a GIF.īut before we create a sequence of images we have to work out how to make one image! Right, with all that out of the way, let's begin! (If this happens you can view an old version of the GIF here). I don't think I can fix that as it appears to be the dev.to caching pointing to the old image! The use case is for email marketing, where we cannot use JavaScript to create a countdown and we cannot even use video (reliably), so an animated GIF is our only option!ĭownloading a 4mb GIF to display a countdown timer would be a massive mistake for performance, use JavaScript instead (plus it is waaaay easier)!įinally - if you return to the page the image might not show for you. Obviously it isn't one massive file (it would need 26 MILLION frames! so it would be quite large) so how did I do it?Īs pointed out in a comment by this is a lot of effort for a countdown timer! In fact you can check for the accuracy of my timer here, it should be within a minute when you first load this page!

I think it is pretty cool that for the next 200+ days (at time of writing) that Gif will always be within one or two minutes of an actual countdown timer! If the GIF doesn't load you can view an old version of the GIF here. Credit must be given to Acres of Learning by using my credit button somewhere in the product.The GIF below is counting down to the 3rd January 2022 at 09:00. If you are using these images for commercial use, they must be added to a product they cannot be used as part of a set of clipart/GIFS.
