Skip to content
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

Invalid Geometry `1:1' #269

Open
datapolitical opened this issue Nov 17, 2021 · 2 comments
Open

Invalid Geometry `1:1' #269

datapolitical opened this issue Nov 17, 2021 · 2 comments

Comments

@datapolitical
Copy link

So my site builds just fine on GitHub Pages, but when I try building it on cloudflare I get this error, which I can tell is related to the JPT code:

mogrify -auto-orient -strip -gravity center -crop 1:1 /tmp/mini_magick20211117-2448-1etmltk.jpg` failed with error: (MiniMagick::Error)
--
22:29:24.882 | mogrify: invalid geometry `1:1' @ error/geometry.c/ParseGravityGeometry/1157.

I think it has something to do with the quotation marks, which aren't present in my code but must be coming from somewhere, because I read that other people have had issues with quotation mark types when dealing with mogrify. But since the code runs fine locally and on GitHub, I'm not sure how to fix it.

@rbuchberger
Copy link
Owner

Hello!

I'm surprised it builds on gihub pages; maybe they added imagemagick to the build image?

This problem comes from the fact that anything based on ubuntu ships an aggressively out of date version of Imagemagick, which does not support cropping by aspect ratio. We ended up switching backends to libvips in 2.0, which gives faster builds, and we started calculating aspect ratio on our own. Consider updating?

@datapolitical
Copy link
Author

datapolitical commented Nov 17, 2021

So I misspoke slightly, it runs fine in a GitHub action using Ubuntu–latest. And you're right, I'm using 1.14 explicitly in my gemfile, and I remember there's a reason but I don't remember what it is.

So I just did the upgrade as you suggested, and it worked! On cloudflare. Now, the build fails on GitHub actions, which I believe is the reason I switched back to 1.14

Even after installing libvips42 with sudo apt-get I get:

Liquid Exception: No such file or directory - vips in /home/runner/work/chrisfnicholson.github.io/chrisfnicholson.github.io/vendor/bundle/ruby/2.7.0/bundler/gems/contrast-137eda1afda7/_layouts/recipes.html

I kind of need it working on GitHub actions as well because cloudflare pages is very new software and will probably break at some point, so I want to make sure I can build the old way on GitHub actions if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants