This Common Mistake Ruins Your Website Loading Speed — PNG or JPG Images?
Eduard Fastovski
Jul 4, 2020
The easiest way to speed up your website is to fix this mistake.
What is the difference between PNG and JPG?
If you don’t know the answer to this question, then you may be using them interchangeably. The reality is that each has its own purpose, and you need to use the correct one in the appropriate situation.
Why using the wrong one screws up your speed.
When you use a PNG for something like a photograph — it will be a huge image file, weighing around 5–10 times more than the JPG version.
For example, the following image (1650px by 1000px) saved as a JPG weighs only 190KB. But if we save it as a PNG, it weighs a whopping 1.8MB! That’s almost 10 times more.
So should you always use JPG? No!
When to use PNG?
There are two major benefits of using PNG images.
1. They have transparency.
So you can use a PNG image without a background. It will overlay perfectly on whatever background is currently on your site. JPG images do not have transparency! If you have a JPG of a product that has had the background removed, it will actually be on a white background — not a transparent one.
2. They look sharper when used for computer graphics.
Computer graphics orvector images are drawn with a computer, things like logos, icons, and images of text. They are not photographs. They often only have one or two colors in the whole image, and strong separations between those colors.
When to use JPG?
You should use JPG in all other cases. As in, when you don’t need transparency, and the image is a photograph, not an icon or logo.
Use JPG for photographs.
Photographs have thousands if not millions of shades of colors and very little separation between them. This is a lot of data and if you save it as a PNG this will be a huge file, weighing 5 times more than the same file as a JPG.
But there’s an exception.
If you have a photo (e.g. a product photo) with the background removed, then you have two options:
If the photo is going to be used on a solid background e.g. a white background or blue, then just save it as a JPG with that background color added in.
If the photo is going to be used somewhere where the background isn’t solid, maybe on top of another image, on top of a pattern, or simply crossing some border or section of your website, then you need to use a PNG.
Just be aware of the trade-off. If you need a photo with a transparent background, and using a PNG will slow down your site, and you are prioritizing design over loading speed.
Need to convert your images?
If you need to convert a PNG image to a JPG I recommend using Squoosh.app. I’m not affiliated with them, it’s just what I use.
The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.
H1 Static and dynamic content
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing.
ujhuhfhe
bjehrbvherbv
jj
H2 Static and dynamic dynamic content editing
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing.
H3 Static and dynamic dyt editing content editing
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing.
H4 Static dynamic content dynamic content editing editing a
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing.
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!
ldkklas lfkasl
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!
How to customize formatting for each rich text
1. fjjf
dlkl
df
fjjf
fjjf
How to customize formatting for each rich text
Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.dvdjvijef
kjsdcbkjsdbvnk jdnv
djcnjd
dfjnvjdfn
“Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled.” - Kyls
Have any questions?
Each month we publish actionable tips & tricks to improve your Shopify store. Sign up to get notified.
Thank you! Please check your email for confirmation.
Oops! Something went wrong while submitting the form.
Have any questions?