Embedding a high-resolution logo
A sharp logo above 100 px
Why the logo gets blurry and how it stays sharp.
What it's about
- The shop loads the logo as a version no more than 100 px tall. Enlarged with CSS, it goes soft.
- It gets sharp with a large file in the file manager and content: url() in your own CSS.
- Without !important the height stays at 100 px.
- Checked in Chrome only; check the rule again after a template update.
Transcript
Click a timestamp to jump to that point in the video.
- Both logos are 140 pixels tall. The left one is blurry, the right one is sharp. The difference isn't the logo – it's the file the shop loads.
- The shop loads the logo as a scaled-down version, no more than 100 pixels tall. If you make it bigger with CSS, you stretch that small image – and it goes soft. It only gets sharp when the shop loads a large file.
- Upload the full-size logo to the file manager. It's then available under slash m, slash s.
- Then go to Template settings, CSS declaration. On your own CSS file, click Edit.
- At the bottom, add one rule: the logo image gets the file from the file manager, using content and url. The height of 140 pixels is already set above.
- Save.
- Three things to know. Without important, the height stays at 100 pixels. We've checked this in Chrome – as far as we know, Firefox shows the old logo, just stretched. And the rule reaches into the template: after an update, check it again.
- Here's how it looks live.
- One large file – and the logo stays sharp, even when it's big.
Also in: Setting up a shop