Skip to content

Fix banner image path issue and set HYRAX_UPLOAD_PATH correctly#850

Merged
aprilrieger merged 1 commit intomainfrom
i846-banner-images
Mar 11, 2026
Merged

Fix banner image path issue and set HYRAX_UPLOAD_PATH correctly#850
aprilrieger merged 1 commit intomainfrom
i846-banner-images

Conversation

@aprilrieger
Copy link
Copy Markdown
Member

@aprilrieger aprilrieger commented Mar 10, 2026

Ref: #846

Problem

Homepage banner images were not loading.

The image files exist and are served at:

/uploads/<tenant>/site/banner_images/...

However, the rendered CSS referenced a filesystem path instead of the public path:

background-image: url('/app/samvera/uploads/...') → 404

Correct path:

background-image: url('/uploads/...')

Cause

The Hyrax Helm chart sets:

HYRAX_UPLOAD_PATH: "/app/samvera/uploads"

when:

derivativesVolume.enabled = true

This path is not under public/, so files written there are not served at /uploads/.

Our infrastructure mounts the uploads volume at:

public/uploads

Therefore, the application must write uploads there so the filesystem path and the public URL path align.


Solution

Set HYRAX_UPLOAD_PATH in the deploy values to override the Helm chart default and match our volume mount.

HYRAX_UPLOAD_PATH: "/app/samvera/hyrax-webapp/public/uploads"

This ensures uploads are written to the location Rails serves at:

/uploads/

Testing

Manual verification:

  1. Deploy with the updated environment variable.
  2. Set a banner image in Admin → Appearance.
  3. Confirm banner images load correctly on:
    • the homepage
    • the Admin appearance preview

Files Changed

  • ops/friends-deploy.tmpl.yaml

    • add/override HYRAX_UPLOAD_PATH to align with Hyku infra volume mounts
  • ops/production-deploy.tmpl.yaml

    • add/override HYRAX_UPLOAD_PATH to align with Hyku infra volume mounts

@aprilrieger aprilrieger changed the title Fix banner image URLs: normalize to /uploads/ and add spec Fix banner image path issue and set HYRAX_UPLOAD_PATH correctly Mar 10, 2026
@aprilrieger aprilrieger force-pushed the i846-banner-images branch 2 times, most recently from a3db6e0 to 7fb4b40 Compare March 10, 2026 23:58
@aprilrieger aprilrieger mentioned this pull request Mar 11, 2026
@aprilrieger aprilrieger merged commit 9df0bca into main Mar 11, 2026
7 checks passed
@aprilrieger aprilrieger deleted the i846-banner-images branch March 11, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants