Error image uploaded from Local storage sources


#1

Hi everyone,

I’ve used Casper. But, i found the error image src. This is my console report:

Any idea to fix this problem?

FYI, i uploade the featured image from my local storage. Do not use Unsplash plugin. When i’m using image from Unsplash, everything its Ok. But, when i uploaded from local storage, the error will appear.


#2

This is on my website display:


#3

Hi @Fathul! Which version of Ghost are you running and what exact configuration for storage are you using? From the log output above, it seems like there’s a stray ng postfix added to image extension everywhere. Can you also provide the full request path these 404s are coming from (you can find that info in the network tab);


#4

Hi Gargol.

I’m using Ghost 2.0. I dont familiar about back-end script. Hope you can explain more.

This is my Network tab as you ask:


#5

This is another image:


#6

Thanks for more info@Fathul! Can you try updating to the latest version of Ghost 2.16.2, as 2.0 is quite outdated? Let me know if the problem persists after that.
How did you install this Ghost version, through CLI or manually from source? Did you do any modifications to configuration files regarding storage?


#7

Hi @gargol. Thanks for your help. I was update the Ghost version to 2.16.2.

48%20PM

But the images still error. See next thread below…


#8

This display when i running on http://localhost:2368/. Everything looks good, right?


#9

When i run on http://localhost:9000/, the error will appear:

I’ve using this blog to instal Ghost on my Macbook:


#10

Hey @Fathul :slight_smile: The blog you referred to is using :2368 port and the Ghost instance is starting on this port as well, and everything seems to work as expected.

I suspect there’s an error on Buster’s side (because that’s what is served on :9000) which adds that ng postfix. Not familiar with Buster, so can’t really help much here :man_shrugging: The only thing that I clearly see that might go wrong is this sed command:

find static -name *.html -type f -exec sed -i '' 's#http://localhost:2368#https://stefanscherer.github.io#g' {} \;

Which replaces http://localhost:2368 with your address, might have a mistake, and that’s why the links are broken in this generated html files.


#11

It’s work @gargol!! Thanks to remember me about bash. I copy and paste tis code below:

#!/bin/bash
buster generate --domain=http://127.0.0.1:2368
find static/* -name *.html -type f -exec sed -i '' 's#u=http://localhost:2368#u=https://stefanscherer.github.io#g' {} \;
find static/* -name *.html -type f -exec sed -i '' 's#url=http://localhost:2368#url=https://stefanscherer.github.io#g' {} \;
find static/* -name *.html -type f -exec sed -i '' 's#href="http://localhost:2368#href="https://stefanscherer.github.io#g' {} \;
find static/* -name *.html -type f -exec sed -i '' 's#src="http://localhost:2368#src="https://stefanscherer.github.io#g' {} \;
find static/* -name *.html -type f -exec sed -i '' 's#link>http://localhost:2368#link>https://stefanscherer.github.io#g' {} \;
buster deploy

And then, my Ghost blog back to party:


#12

Awesome :smile: glad everything is sorted now! Cheers!


closed #13