jekyll-imgix not working on Siteleaf #35
Unanswered
jeremylenz
asked this question in
Community Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm in the process of switching from
jekyll-assets
to imgix (see my recent post). I noticed there is ajekyll-imgix
gem which gives you a helper,imgix_url
, which you use like this:In development mode,
imgix_url
does nothing. This is because theimgix_url
helper just returns the unaltered path unless Jekyll is in production mode. If the path to my photo were, say,/uploads/josh-couch-475118-unsplash@2x.jpg
, I'd end up with a tag that looks likeIf I set my
JEKYLL_ENV=production
withand check again, I can see that imgix has worked its magic and replaced the url:
The issue I'm having is that this doesn't seem to work with Siteleaf publishes. I'm getting the unaltered urls on all of my tags.
I've verified that
jekyll.environment == 'production'
, even on Siteleaf publishes. But I'm having trouble figuring out what's going on.The way that imgix decides this is not
jekyll.environment == 'production'
, but(see https://github.com/imgix/jekyll-imgix/blob/0a8049046733078c7667e5bd33a4a6a4853b3b47/lib/jekyll/imgix.rb#L92)
Is there any way these two methods could return different values, causing
imgix_url
not to work? Can you think of anything else I might be missing?I think this will end up being a great solution for us if I can get past this final hurdle. Thanks in advance for your thoughts!
Beta Was this translation helpful? Give feedback.
All reactions