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
[fix] Improve sharp failure fallback #20174
Comments
github-actions
bot
added
the
needs:triage
[triage] this needs to be triaged by the Ghost team
label
May 9, 2024
I've found a temporary workaround, after going through some of Ghost's code. It seems like there is a check which prevents So the solution was to:
You would also need to add this to {
...
imageOptimisation: false
} Doing the above completely disabled sharp and now allows me to upload images (albeit, the images are a bit large, but I can make do :D) |
github-actions
bot
removed
the
needs:triage
[triage] this needs to be triaged by the Ghost team
label
May 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Summary
Summary
I've been racking my head around why my Ghost container on Docker doesn't upload images correctly. A lot of forums pointed out the issue could be with the sharp installation, so I did the following:
After some debugging, turns out the host machine I was running Ghost on (a beatdown Lenovo Ideapad z575, with Quad Core 1.40GHz AMD A6-3400M Processor) had an extremely old CPU architecture which was not supported by sharp, specially the versions compatible with Ghost.
What to do
I think there should be a more graceful fallback for sharp. I mean, if I don't really want to use it, I should have the option to totally purge it. Plus, it should be able to handle any sort of such issue. Perhaps a try-catch.
Also, if I've disabled imageOptimisation, why does Ghost still try to fetch images of different sizes in production?
Steps to Reproduce
false
Ghost Version
5.82.2
Node.js Version
18.20.2
How did you install Ghost?
Docker on Ubuntu 22.04.4 LTS, Lenovo IdeaPad Z575 (https://www.bhphotovideo.com/c/product/793706-REG/Lenovo_129925U_IdeaPad_Z575_15_6_Notebook.html)
Database type
MySQL 5.7
Browser & OS version
No response
Relevant log / error output
Code of Conduct
The text was updated successfully, but these errors were encountered: