-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support images with query strings on them #34
Comments
We have this same setup with cloudfront. You could probably do something like this... Check if the string contains more than one '?'. If it does replace any following with '&' |
sure... we are doing that too. Ideally this code would be smart enough that we wouldn't have to though! |
@benhutton what are you doing to work around this? I'm having trouble using a cache busting timestamp |
@axelson I've moved away from timestamps to asset fingerprinting based based on an md5 hash of the file contents. So, your filename looks like |
Ah, ok. That's a bit harder for us since our server never touches the files, they go straight to s3. As far as I can tell it is actually impossible to use query parameters to bust Imgix's cache. At least I only need this as a temporary transition and Imgix's url purging endpoint seems to be working well. |
For anyone who might still be wondering about this issue/finding this over a year later, there are a few things I want to mention. client.path("/path/to/image.jpg").to_url({t:12345567})
# .../path/to/image.jpg?ixlib=rb-3.0.0&t=12345567
Closing this issue now, but feel free to comment back with any questions. |
Our image urls already end with a cache busting timestamp for a query string.
Because of https://github.com/imgix/imgix-rb/blob/master/lib/imgix/path.rb#L91, the imgix query string is not being properly appended to an existing query string. It assumes there is no query string.
Our image paths look something like
/path/to/image.jpg?t=12345567
Currently, we get something like
/path/to/image.jpg?t=12345567?w=500&h=300
Too many question marks! It should be
/path/to/image.jpg?t=12345567&w=500&h=300
The text was updated successfully, but these errors were encountered: