Move default versions of Paperclip-managed images to /public

Image paths for these files are handled by Paperclip, which (with our current version) does not handle fingerprints on assets. Therefore we need to make these images available under /public
This commit is contained in:
Matt-Yorkley
2020-06-26 20:01:55 +02:00
parent 5929b9c1e5
commit ff8cb43717
5 changed files with 4 additions and 4 deletions

View File

@@ -7,15 +7,15 @@ class ContentConfiguration < Spree::Preferences::FileConfiguration
preference :logo, :file
preference :logo_mobile, :file
preference :logo_mobile_svg, :file
has_attached_file :logo, default_url: "/assets/ofn-logo.png"
has_attached_file :logo, default_url: "/default_images/ofn-logo.png"
has_attached_file :logo_mobile
has_attached_file :logo_mobile_svg, default_url: "/assets/ofn-logo-mobile.svg"
has_attached_file :logo_mobile_svg, default_url: "/default_images/ofn-logo-mobile.svg"
# Home page
preference :home_page_alert_html, :text
preference :home_hero, :file
preference :home_show_stats, :boolean, default: true
has_attached_file :home_hero, default_url: "/assets/home/home.jpg"
has_attached_file :home_hero, default_url: "/default_images/home.jpg"
# Map
preference :open_street_map_enabled, :boolean, default: false
@@ -57,7 +57,7 @@ class ContentConfiguration < Spree::Preferences::FileConfiguration
# Footer
preference :footer_logo, :file
has_attached_file :footer_logo, default_url: "/assets/ofn-logo-footer.png"
has_attached_file :footer_logo, default_url: "/default_images/ofn-logo-footer.png"
# Other
preference :footer_facebook_url, :string, default: "https://www.facebook.com/OpenFoodNet"

View File

Before

Width:  |  Height:  |  Size: 283 KiB

After

Width:  |  Height:  |  Size: 283 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB