Common pitfalls

Common pitfalls

  • On authored content, avoid inline SVGs. Give preference to common Sanity images.
    • SVGs are complicated for editors to submit and modify those
    • They weight down the HTML, even when below the fold
    • As they're part of the HTML, they won't be cached by the user's browser, being downloaded every time the page is loaded
    • The <SanityImage> component will render SVG images as proper .svg files, so we can still keep the small file size and crispiness of SVGs
💡

This list is pending, feel free to suggest new pitfalls based on issues you've stumbled on in the past