gatsby-source-sanity
gatsby-source-sanity copied to clipboard
Add support for tracedSVG
Is there any specific reason it's not supported right now? According to the gatsby-image docs, only these options are supported:
gatsby-source-sanity
GatsbySanityImageFixedGatsbySanityImageFixed_noBase64GatsbySanityImageFluidGatsbySanityImageFluid_noBase64
Since Sanity offers a full image transformation pipeline of its own, Gatsby doesn't need to download the images in order to generate multiple sizes. Since Gatsby doesn't have the image data, its unable to process the image into an SVG “trace” to serve up.
@coreyward how about adding the ability to download & use downloaded images? It would especially help people that are on Sanity developer plan to not hit the CDN limits.
It's solvable with Schema customization or gatsby-plugin-remote-images.
Sanity provides a pretty generous allotment of bandwidth and the charges for overages are fair. In any case, downloading the full size versions for local processing on every build would be quite a bit of bandwidth itself, plus it would slow your builds and you’d need to pay for the bandwidth they consume elsewhere. Six of one, half a dozen of another.
@coreyward that should be up to the plugin users though shouldn't it? Besides, static file hosting is becoming so cheap and abundant that the "bandwidth" part of your argument is almost irrelevant.
It would especially help people that are on Sanity developer plan to not hit the CDN limits.
… hosting is becoming so cheap and abundant that the "bandwidth" part of your argument is almost irrelevant.
🤔🤷♂️ I'm just trying to provide some context based on what you asked.
@coreyward sure, and I'm just addressing it :) If there's not some secret policy in play, I think providing an option to download & use sanity images locally would be a good addition.
There's also this: https://github.com/reactgraphqlacademy/gatsby-source-sanity-transform-images
Hello maybe can you also support different kinds for loading images
@rexxars would you be open to support local images?
@rexxars would you be open to support local images?
I'm open to downloading pre-transformed images, but I'm skeptical about pulling down full-size images and transforming them on the client, since that will add sharp as a dependency and have a totally separate code path. Native modules are a bit of a pain and usually leads to a large number of platform-specific build issues and whatnot.
@rexxars would you be open to support local images?
I'm open to downloading pre-transformed images, but I'm skeptical about pulling down full-size images and transforming them on the client, since that will add sharp as a dependency and have a totally separate code path. Native modules are a bit of a pain and usually leads to a large number of platform-specific build issues and whatnot.
Client === at build time here?
Also, that means that avif support is dependent on Sanity doing the transforms (and avif is expensive to create)?