Ghost: Unable to manipulate image

Issue Summary

Since the last ghost update (5.53.3), I’m unable to upload a gif (its size is 6MB) to my blog.

In my container logs, I have the error you see in the screenshot.

How can I configure the limitInputPixels or resolve this issue please ?

Steps to Reproduce

  1. Adding a Gif via the Ghost Editor

  2. Expected : Showing the gif in the blog like before

  3. What Happened 👇🏾

In ghost editor

CleanShot 2023-07-11 at 08 17 47

Ghost container Logs

CleanShot 2023-07-11 at 08 17 55

Ghost Version

5.53.3

Node.js Version

16.20.1

How did you install Ghost?

Self-Hosted in a container on a Ubuntu 20 OS

Database type

MySQL 8

Browser & OS version

Brave & Mac OS Monterey

Relevant log / error output

No response

Code of Conduct

  • I agree to be friendly and polite to people in this repository

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

@ngeorger If Ghost is throwing the error “Input image exceeds pixel limit” when there’s a permissions problem, I’d say that’s a bug in Ghost.

@Sahil-K123 @Pratik1603 You don’t have to wait for an issue to be assigned to you, just leave a comment that “I’m working on a PR” for this and start on one. Describe how you’d solve the problem if you’d like. Whether the issue is assigned to you or not, there’s not guarantee that the pull request you submit later will accepted-- that will depend on the solution you submit and the quality of code.

By declaring that you are working on it, anyone else reading the issue can decide they want to wait for your PR to be done or pursue another solution for themselves.

Hey @1kevinson , Please assign this issue to me.

Also experiencing this issue with GIF’s. When added:

"imageOptimization": {
  "resize": false
}

To my Ghost config, it allows me to upload GIF’s. But obviously not ideal as it disables optimizations of all other non-GIF images.

This seems to be due to the limit within Sharp - limitInputPixels: https://sharp.pixelplumbing.com/api-constructor

We’d probably consider accepting a PR that would make this configurable 🙂