Comments (17)
👋 @mllocs and @brandoncc
I made this change on our fork and the net increase inside the heroku-20
stack build was +23.5 KB
@brandoncc if that seems like an acceptable increase in size I'd be happy to submit a PR with the updated configuration and builds.
It might be worth pointing out that the libvips install guides flag the increased attack surface by including Imagemagick in the build.
ImageMagick, or optionally GraphicsMagick
If you are going to be using libvips with untrusted images, perhaps in a web server, for example, you should consider the security implications of enabling a package with such a large attack surface.
Source: https://libvips.github.io/libvips/install.html
from heroku-buildpack-vips.
libvips 8.12 has a new built-in GIF saver, so you no longer need imagemagick for this feature.
from heroku-buildpack-vips.
from heroku-buildpack-vips.
Thanks for opening this issue. I'll look into this and see if it looks doable. I don't have a problem doing this as long as it doesn't cause bloat. I'm not sure how much space usage libmagick introduces (the name is reminiscent of imagemagick which is what makes me wonder).
If you would like, you are welcome to fork the repo and add this to the build. Then we can compare the build sizes.
If you would rather I do the test, I'll try to work on it this weekend.
from heroku-buildpack-vips.
Thanks for the answer @brandoncc 🙂
I tried forking the repo and doing a new build installing imagemagick
as a dependency (also updating to [email protected]) but I had no success, I still get the same error in Heroku when trying to convert gif images.
I suspect I didn't configure the build properly. JCupitt mentioned to add libmagick support but I'm not quite sure how to do that in the buildpack.
from heroku-buildpack-vips.
libvips 8.12 has a new built-in GIF saver, so you no longer need imagemagick for this feature.
Hi, thanks for this build pack, however I still see the original issue mentioned on libvips 8.12.1-Wed
from heroku-buildpack-vips.
Sorry, I misspoke, libvips has a new GIF saver, but it needs cgif for the actual encode. This should be added to the build and imagemagick removed.
https://github.com/dloebl/cgif
(cgif is only v0.2, but it's being used by quite a few large sites (like shopify), so (imo) it's fine)
libvips 8.12.1 didn't fall back to imagemagick correctly for GIF, but 8.12.2 fixes this.
from heroku-buildpack-vips.
Thank you for letting us know about that new GIF saver, John!
I'll work on adding this over the weekend.
Sorry for the delay on this issue, everyone.
from heroku-buildpack-vips.
Yeah, I had real trouble adding cgif via aptfile if anyone knows how please share the result.
from heroku-buildpack-vips.
@jcupitt I'm guessing that I need to add cgif to the build script, rather than just installing it on the server after the fact. Can you confirm that?
@matthewford if John confirms, then this is the reason. I'll build it with cgif this weekend (likely tomorrow).
from heroku-buildpack-vips.
Yes, you need to build from source (it's very simple) since cgif hasn't been packaged yet (as far as I know).
from heroku-buildpack-vips.
And just to push this verification a little further, it needs to be built/available during the build of libvips. Is that correct, John?
from heroku-buildpack-vips.
That's right -- check the messages from configure. I would add libspng as well, if you're revising this stuff. It's quite a bit faster and smaller than libpng.
I see:
...
PNG load/save with libspng: yes
(requires spng 0.7 or later)
PNG load/save with libpng: no
(requires libpng-1.2.9 or later)
selected quantisation package: imagequant
...
GIF save with cgif: yes
(requires cgif and a quantisation package)
...
You can use vips --vips-config
after building to check all the configured packages.
from heroku-buildpack-vips.
You are the best, John. Thank you again.
from heroku-buildpack-vips.
Hi @brandoncc any chance of updating the buildpack? Many thanks.
from heroku-buildpack-vips.
@brandoncc happy to test if there is a branch/pr?
from heroku-buildpack-vips.
I'm sorry for the extremely long delay on this issue. Saving GIFs should work now https://github.com/brandoncc/heroku-buildpack-vips/blob/4d51d1cb1546ace27ccfd8aa928c017c2cfd4a3d/build/configurations/heroku-22.config.log#L38
If there is any further trouble, feel free to re-open the issue.
from heroku-buildpack-vips.
Related Issues (20)
- Error: '/usr/src/vips/lib/libvips-cpp.so': No such file HOT 10
- vips 8.9.2 HOT 3
- Support for libwebp and libheif HOT 14
- 500's after latest changes HOT 13
- VipsForeignLoad error converting PDF to PNG HOT 1
- Broken in heroku-20 HOT 2
- heroku vips wont build HOT 10
- GIFLIB can be removed from the build HOT 9
- PDFs not working unless I add `poppler-utils` to Aptfile HOT 1
- (mis)usage of heroku-buildpack-vips HOT 1
- Support for heroku-22 HOT 4
- AVIF not working out of the box HOT 2
- Heroku-22 support
- Thank you for maintaining this until now :) HOT 13
- Do we actually need an Aptfile for libglib2.0? HOT 2
- HEIF/HEIC support seems broken HOT 38
- Update to libvips 8.15.0
- Can't build sharp 0.32.6 with version 8.14.5
- Support for heroku-24 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-vips.