Skip to content

Responsive Images (remote) #2902

@kildareflare

Description

@kildareflare

Hi, first up great work. I've just completed my first site using Gatsby and it's awesome!
My first time using React and GraphQL and I've enjoyed it (normally use Angular1/Angular2).

My site is backed by the prismic headless CMS and uses this source plugin to get the data.

I'd now like to make the images responsive.

I'm aware that Gatsby has a responsive image plugin but it appears to work only with local images and mine are hosted remotely in the prismic CMS. In theory it would be possible to add multiple images in prismic and infer what to display where based on the data returned. But I'd rather this was all handled automagically and only one image needed to be added to prismic.

Question. Is there a way to handle remote images with the existing plugin - have I missed something?

I'm assuming not, in which case would the best thing be to:

  • extend the plugin with a new option, that when set, fetches remote images, saves them locally and then processed them as normal?
  • create a new plugin to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions