
Technologist • Philosopher • Builder Discovering real-world problems. 🛠️ https://teapawt.org/t.co/dCoiHg8QSg 📖 https://teapawt.org/t.co/WFbdWmPXMn 📖 Writer | ♟️ Chess
Botswana
Joined April 2022
- Tweets228
- Following2.1K
- Followers2.1K
- Likes8.4K
Ray McMillan retweeted
Learning to code is like a spiral. Eventually you come right back where you started and learn it again but deeper this time.
Ray McMillan retweeted
You're a frontend engineer. 🗣️
A recruiter asked you this:
"For your project, when should you use svg or png? for
image and icon format"
Here's how to answer.
When responding to the question about whether to use SVG or PNG for images in your project,
should consider the following factors and provide a well-informed answer:
Use Case:
Explain that the choice between SVG and PNG depends on the specific use case.
SVG is a vector format that is great for icons, logos, and graphics that need to be scaled without losing quality. PNG, on the other hand, is a raster format better suited for photographs or images with complex details.
File Size:
Consider the impact on page load times. SVG files tend to be smaller in size compared to equivalent PNGs, which can lead to faster loading web pages.
Complexity:
If your images are simple and consist of basic shapes or icons, SVG is a natural choice. However, for complex images or photographs, PNG might be more suitable.
Accessibility:
Mention that SVGs can be made accessible more easily through techniques like adding alt text for screen readers.
Performance:
In cases where performance is crucial, such as for mobile apps, SVGs may be preferable due to their smaller file size and flexibility.
Alright, that's a wrap. Follow me @mysticwillz for more tweets like this.
Ray McMillan retweeted
Debugging is like being a detective in a crime movie where you're also the murderer
#100DaysOfCode #100daysofcodechallenge #reactjs






