Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Add multi-source support #11

Merged
merged 1 commit into from
Dec 17, 2019
Merged

Add multi-source support #11

merged 1 commit into from
Dec 17, 2019

Conversation

hashknot
Copy link
Contributor

This PR adds support for generating URLs across multiple imgix sources.

Multiple sources can be specified through the following configuration:

imgix:
  sources:  # imgix source-secure_url_token key-value pairs.
    assets.imgix.net: FACEBEEF12
    assets2.imgix.net:            # Will generate unsigned URLs
  default_source: assets.imgix.net  # (optional) specify a default source for generating URLs.

and used in the following manner:

<img src={{ "/images/bear.jpg" | imgix_url: "assets2.imgix.net", w: 400, h: 300 }} />
<img src={{ "/images/bear.jpg" | imgix_url: w: 400, h: 300 }} />

This is a completely backwards compatible change.

@hashknot hashknot requested a review from jayeb August 30, 2018 21:39
Copy link

@jayeb jayeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small grammatical fix in the README, but otherwise looks great 👍

README.md Outdated

### Multi-source configuration

In addition to the standard configuration flags, following options can be used to serve images across different sources.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "the following options"

Add support for generating URLs across multiple
imgix sources.
@thexavismith
Copy link

Ran into this exact issue today! Would love to see this merged

@thexavismith
Copy link

@jayeb Will this be merged soon? I'd love to be able to have multiple sources…

@sherwinski sherwinski merged commit a13caa8 into master Dec 17, 2019
@sherwinski sherwinski deleted the multi-source branch December 17, 2019 21:12
@sherwinski
Copy link
Contributor

Hey @smithtimmytim sorry for the very delayed response here. Multi-source support is now available via v1.2.0 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants