Forem Creators and Builders 🌱

Muhammed Cetin
Muhammed Cetin

Posted on

Cover Image Cannot be Displayed

Hello everyone,

I've finally been able to deploy Forem on Heroku thanks to @akhil . However, I've a problem with it. I've setup Cloudinary and Amazon S3 Api variables on Heroku and I was able to use them. Then, I created a Welcome thread and add a cover image in it but it cannot be displayed. My Cloudinary account is not a paid account, it is the free one. I think that it might be the reason of this problem but I'm not sure. Do you have an idea about that?

You can check my forem instance and welcome thread by following the link below.

https://www.windows11.dev/ce7in/welcome-thread-5aik

The cover image link that is defined as an src attribute:

https://res.cloudinary.com/ce7in/image/fetch/s--QkEpIC-d--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://s3.us-west-1.amazonaws.com/answr.to/uploads/articles/npr34f53x0930dftpq7e.jpg

Top comments (5)

Collapse
 
akhil profile image
Akhil Naidu

The reason you are not able to see this is because you configured Cloudinary. Checkout this URL: res.cloudinary.com/ce7in/image/fet...

It is same URL, with removed feature of Immage, Imagga is a paid feature used by dev.to in cloudinary, while Forem in using 2 different methods to point out this issue.

  1. By using imagemagick
  2. By using a standalone imgproxy server. (But the ruby code written for imgproxy is only valid if the imgproxy is installed within the same server, its sad though!)

But within Forem cloud they managed to pull of this by creating a persistent volume folder named remoteimages to save images locally and use imgproxy in local server and resize images properly. I was about to point this issue as this might make the cost of storage so high as the community grow.

Yes! one advantage is pointing out this issue can resolve our issues, as imgproxy support on the fly image resizing. So, the code can be alteredin such a way that when files aer uploaded they will be uploaded in the cloud without resizing(That is how it is being done, if only s3 was configured), then when the post was published we should be able to use our standalone imgproxy(preferably not in local server support). This way we can minimize the data stored within the mail server.

Collapse
 
akhil profile image
Akhil Naidu • Edited

Ok, the way you can resolve your issue from any one of these two different soulutions.

Solution 1: Remove Cloudinary ENV varibales. That's it, everything will work fine, but without image resizing.

Solution 2: Within your Cloudinary account in the addons section, you can find immga extension, install it, they have a free tier for 50 images resizing per month.

In my opnion going with solution 1 would be great, until @forem decided to give us a helping hand in configuring imgproxy.

Collapse
 
djuber profile image
Daniel Uber • Edited

We just ran into this problem with another self-hosted forem community trying to move from local to cloudinary setup.

Adding the imagga crop and scale plugin (not the imagga auto tagging) to cloudinary fixed it immediately.

This shouldn't be strictly required (DEV.to uses it, but it doesn't mean it should be needed to use cloudinary), and we'll be discussing making that plugin optional.

Collapse
 
ce7in profile image
Muhammed Cetin • Edited

Your instructions are so helpful @akhil . After adding the immga addon, the problem has been solved. I'm so glad you're in this community. Thank you so much.

Collapse
 
akhil profile image
Akhil Naidu

I will include this in my post, I though no one is using it 😂😅