-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Closed
Description
I think it would be great if public URLs for SVGs could be generated through ImageSharp. Currently, if I want to use vector and raster graphics interchangeably, I need to use some extra code similar to below:
let thumbnailSrc;
if (video.frontmatter.thumbnail != null) {
thumbnailSrc =
video.frontmatter.thumbnail.childImageSharp != null
? video.frontmatter.thumbnail.childImageSharp.sizes.src
: `/${video.frontmatter.thumbnail.relativePath}`;
}Also, I have to put all the related images to the /static folder and make them discoverable by gatsby-source-filesystem. Querying SVGs just like raster images would simplify this workflow by a lot.
busticated and CanRau
Metadata
Metadata
Assignees
Labels
No labels