There are a lot of images I have to show in the Flutter mobile application. What is the best choice? When showing images, use PNG or SVG. Could I know when the comparable difference accepts I searched for a lot, but I didn’t get a considerable amount of results in this manner.
PS: I don’t use network images or any assests.
2
Answers
With more research on these, I have found the following:
For someone who looking in this manner I think this will be somehow useful.
When adding images to our flutter app, we usually use .png, .jpeg, jpg, or .svg images. Each format has its own style.
But most designers and developers prefer .png images or .svg files. Besides their transparent background, there are many other differences between these two image formats as listed below.
PNG (Portable Network Graphics)
Images in PNG format are high-resolution, lossless compressed, and transparent.
In most cases, raster-based files are the best choice for adoption.
SVG (Scalable Vector Graphics)
This type of file is vector-based, which means it is rendered based on mathematical algorithms. They can also be scaled up or down without losing quality. Furthermore, they also assist with Search Engine Optimization (SEO).
Each format comes with its own advantages. If we need a high-resolution image that can handle multiple colours then .png would be the best choice, whereas if we are dealing with logo design, or want to play around with the same image of different sizes without being pixelated then .svg would be the format to consider.