Comments (8)
In a simple example I replaced the binary file client/js/components/Header/logo.png and suddenly I now get this error.
from spree_starter.
Hi @chrisdobler What is the size of the picture?
from spree_starter.
they range from 100kb and up. Whats the limit on the embedded images? I couldn't find that in the config.
from spree_starter.
I realized I could suppress the error message by turning off the prerender option in the rails view. I don't understand the implications of doing that though.
from spree_starter.
The "limit" is set in webpack.client.base.config.js
10000 = 10Kb. Under this limit, it loads as "a url", going your HTML payload. Above, it's using a regular file. You shouldn't raise this limit, at some point it becomes way less efficient to load as url.
It's not supposed to behave like this though. You probably don't want to remove server rendering either, because it's a key feature of this project.
I think I remember having a very similar issue when deploying such images, the image was passed into /assets/ but the routing in the build was wrong (served from the root, like in your issue). There's probably some tweaking to do in the webpack build files.
I'll feed this issue if I come across this issue again or if I can reproduce it
from spree_starter.
I can indeed reproduce the issue. If you try accessing /public/6b4fec0f21ce52aebc80204c2d5c4849.png
instead of /6b4fec0f21ce52aebc80204c2d5c4849.png
, you will see it's going through the asset pipeline.
I think it's a webpack config issue, but I don't have time to look at it right now.
from spree_starter.
thank you for the response as well as the explanations. I guess I'll remove server rendering temporarily until its patched.
from spree_starter.
I tried uploading to Heroku and am having the same issue in production.
from spree_starter.
Related Issues (20)
- Docker Compose + Headless Spree + Nextjs Frontend build HOT 3
- spree_sample no images Docker HOT 2
- Installation error on Windows 11 WSL2 - PG::UndefinedTable: ERROR: relation "spree_countries" does not exist
- error in heroku
- Create Spree CLI for bootstraping an application with Rails/Vue/React storefronts
- Fix test suite on CircleCI
- Running bin/start-docker returns errors HOT 1
- Command "start-hybrid" spins up container with web app HOT 1
- Nokogiri Error on fresh install HOT 8
- We're sorry, but something went wrong. If you are the application owner check the logs for more information. HOT 1
- I finished setup but when upload logo, it always not display
- No routes working except admin HOT 1
- add code-server in docker-compose.yml
- Issues uploading images using Heroku deployment
- Please guide to run a production build for the same HOT 17
- *** stack smashing detected ***: terminated HOT 1
- "*** stack smashing detected ***: terminated" on M1 Apple Silicon HOT 4
- Fresh install gives sprocket error re: spree-dashboard.js HOT 2
- Product Form Fields Show Duplicates HOT 2
- Creating test file instead of creating spec file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spree_starter.