Forem Creators and Builders 🌱

Varhal
Varhal

Posted on

Cover image issue when publishing articles using API

I am currently creating a migration script from Forem to wordpress using the Forem API. The script passes the parameters to the API and publishes the article. Everything works well except for the cover image.
I am passing a link to the image: main_image: "https://example.com/wp-content/uploads/trinity-nguyen-U_rsN9KFvsQ-unsplash-scaled.jpg"

Image size: 1607x2506px

When an article is published on Forem, the cover image is transferred at 280x420 and looks terrible. Also, the image format changed from .jpg to this: https://www.example.com/images/7cHdE_U7N8yEuRlH9hELTcNV5RV1al1Jx4VWdCf4-us/s:1000:420/mb:500000/ar:1/aHR0cHM6Ly9zdG9j/a2llLmNjL3dwLWNv/bnRlbnQvdXBsb2Fk/cy90cmluaXR5LW5n/dXllbi1VX3JzTjlL/RnZzUS11bnNwbGFz/aC1zY2FsZWQuanBn

As I understand it, when publishing articles using the API, all images change the format, but only the cover image changes size. Tell me how to solve this? thanks

Top comments (3)

Collapse
 
ellativity profile image
Ella (she/her/elle)

Hey @varhal , all cover images are constrained to 1000 x 420 px dimensions. The cover image doesn't expand beyond 420 px high, so all your images will be cropped to fit this.

Forem is, at its core, a community space, which means showing up and being present in the space. It's not currently optimized for API posting, RSS posting (where users actively need to Publish the posts from their Dashboards after import), etc.

In my opinion, and I don't speak for the broader strategy of the company, publishing remotely is a content strategy rather than a community strategy. My vote will always be for developing the product in ways that nurture connection.

That said, I believe @ben has some ideas about API development that we may be interested in exploring, so I encourage you to continue to share your experiences and ideas here. We may not be able to provide you with immediate solutions to your frustrations, but we are willing to listen and learn how we can accommodate the needs of your community.

Collapse
 
varhal profile image
Varhal

Hey @ellativity , thanks for the answer.

Maybe I didn’t explain well. The problem is that by API I am passing a large image for the cover of the article to Forem. Forem does not crop it to the size of 1000 x 420px, but crops it to the size of 280 x 420px. Therefore, the image displayed blurry.

Collapse
 
ellativity profile image
Ella (she/her/elle)

Thanks for elaborating on this, @varhal . I see your point. I'm going to ask if anyone knows the reason your Forem is not just cropping your image 1000 x 420 px.