Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design

Konrad Pilch
Konrad Pilch
2,435 Points

How is GIF doing and will be in the next years?

So, i have a question at college saying:

"• Animation – Giff is dying why? It is bit-map so it’s not fully scalable etc"

Huh?

I use GIF on my website to animate a coding thats sliding in my background.

Please share more about this please. Plus i don't think we can use any other image format to animate images by GIF right?

Heres my gif anyways

2 Answers

Codin - Codesmite
Codin - Codesmite
8,600 Points

I would say GIF is already dead.

A lot of large websites that primarly deal with GIF images for example imgur, dropped support for GIF a long time ago. What they do is convert GIF images to HTML5 video .webm, reducing the file sizes up to atleast 10 times (You can compress webm files to crazy small sizes without loss of quality, I recently compressed a 1080x1920 10 second webm video smaller then a single compressed 1080x1920 PNG file).

As Michael also mentioned BPG is set to replace GIF, JPEG and PNG.

BPG is higher quality then PNG and also compresses to sizes far smaller then PNG, GIF, or JPEG ever could, and natively supports animation.

Unfortunately no browsers support BPG as standard as of yet, I expect a new standard for declaring images and fallbacks in HTML similiar to the HTML5

 tag will come before BPG support as there will always be the problem of having to provide fallback images for BPG.

You can start using BPG in your websites already using javascript BPG encoders, but will require a fallback for noscript users.

Example of quality difference between BPG and current formats:

http://xooyoozoo.github.io/yolo-octo-bugfixes/#waterfall&jpg=t&bpg=t
Konrad Pilch
Konrad Pilch
2,435 Points

I finished now but in one word, i need to basically change it and say it dead?

It's confusing, i mean facebook added more of GIF.

Ill write later one again.

Codin - Codesmite
Codin - Codesmite
8,600 Points

It's not actually Facebook that is using GIF files, they support remote linking of files, so if someone adds a .gif file to Facebook it will play, from the source and not Facebook. It would be a waste of their resources to convert these files as they do not host them anyway. If you were to upload a .gif file you will find it will be converted to more easily compressed files such as webm, Facebook is a complicated example because they will change file types and compressions based on the users browser/device, so in some cases they may deliver the GIF file but only when a other smaller file sizes are not compatible with the users setup.

Facebook has only just finnally moved away from Flash on their web browser site (very shady reasons why they stayed with Flash in the first place seeing as their mobile websites have used html5 video and webm formats for years.. but we wont go into that privacy breach conspiracy theory).

Facebook has also just introduced animated profile pictures using html5 video rather then GIF files.

GIF, JPG, BMP and PNG are all very outdated, SVG, WEBP/WEBM and future prospects of BPG or FLIF are becoming more standard.

I do not actually remember the last time I used a BMP, JPEG or GIF file (it has been atleast 2 years), I normally just use compressed PNG files (using compression such as https://tinypng.com/), WEBM for animation (using compression such as handbrake), and SVG where appropriate.

Codin - Codesmite
Codin - Codesmite
8,600 Points

In regards to you GIF image on your portfolio.

The resolution is tiny, yet the file takes up 1.4mb of resources when landing on your page, that is a huge amount of resources wasted for a 360x240 resolution image.

I have a webm video I used for a client recently that is 1920x1080, 10 seconds long that only weighs in at at 1.7mb. http://www.fsinclair.co.uk/images/vid1-1920.webm In comparison this is a huge resolution video file that is only 0.3mb larger than your tiny resolution GIF file.

Here is your GIF file as a .webm: http://www.codesmite.com/misc/code-1.webm Before Apache compression and file compression it is only 0.17mb :)

Even if you did not want to use video, instead of using GIF, you could literally use compressed PNG frames and loop them with CSS3 animation or Javascript and still use a quarter of the resources you currently are with the GIF file..

Konrad Pilch
Konrad Pilch
2,435 Points

Me too! Now I can re-write it all : p

Interesting!

Michael Afanasiev
PLUS
Michael Afanasiev
Courses Plus Student 15,596 Points

Hey Konrad,

GIF's are fine and it'll take few years before it's completely gone There is a new format on the way called BPG which stands for Better Portable Graphics that will support animation. It rumors that it will replace not only GIFs but JPEGs as well.

I'm not that keen on this subject and to be honest, I don't think it will happen any time soon, but here's some links with more information to read about:

https://eek.ro/why-bpg-will-replace-gifs-and-not-only/

and

http://bellard.org/bpg/ (Supposedly the official website for BPG)

Konrad Pilch
Konrad Pilch
2,435 Points

Thank you :)

I just wanted to have more informatio about it. What i wrote is :

"

Animation GIF file format is made to display a kind of video with images. We know that it takes around 25frames per second to have a clean video. A GIF is like a video, with less frames and no audio. You can take pictures and then put it in GIF format, and they will all have a time that each of the image will be displayed, and if it’s done right, it will look like a lagging video. This is the only format that lets images to be displayed in video way. Adobe Flash has failed in the modern word. It’s not welcome anymore. Flash is dying and is not supported in many devices. No one should use flash these days, there are few exceptions on when it’s right to use flash. GIF is great in today’s days. We can have animated, cartoon style videos, made by images. With the new HTML5 support, the animation is interesting technique for alternative. Having enough bandwidth to use it now is a part of the appeal.
In the old days GIF was something to be ashamed of: bad graphics, crude cartoon style animation, solid colours and so on.. In today’s day, artist have renewed interest in it by greeting funny GIF’s as well as for professional use , so GIF is widely used these days, and companies like Facebook even made an extra space for the animations of GIF. GIF file is not dying. It has comeback. Few years ago it was dying, now it’s renewed and everyone uses it. GIF’s are just fine. It will take years before it will be deleted, this when we will have a super good technology that will carry all the things we would have done now, but can’t. What will happen instead is that a new file format called BPG, which stands for Better Portable Graphics that will support animations. There are few rumors that it will replace not only GIF’s but JPEG’s as well.

"