-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Storefront images disapear #401
Comments
Hey, could you add some information:
|
Image is not being served and appears as a broken link. .url generates url_for generates https://hostname/rails/active_storage/representations/redirect/##REF## Storage is local to the server using the Disk service. No proxies are involved. Web server is Apache2/Passenger |
The proposed fix (#403) only fixes it when ActiveStorage uses the "local" backend. Most stores use some kind of object storage, like S3, so we need a different fix. This is an interesting issue, because the usual solution is for the store operator to configure ActiveStorage to generate public URLs, but this is a very common stumbling block. Moving the caching to avoid caching the images is probably a good solution. |
@jarednorman can you elaborate what you mean by moving? |
@jarednorman Out of interest why would you not want to use the url_for helper? https://guides.rubyonrails.org/active_storage_overview.html#serving-files suggests this is the correct way to handle them. |
@magpieuk Oh, I was mistaken about how that worked. That is probably the right solution. My mistake. |
Images on store front disappear after a while.
Solidus Version:4.4.2
When deployed to production environment with caching enabled, images disappear after a while.
src: image_tag image.url(size), default_options.merge(options)
image_tag url_for(image.attachment.variant(size)), default_options.merge(options)
The text was updated successfully, but these errors were encountered: