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

Support for libwebp and libheif #7

Closed
wilg opened this issue Sep 16, 2020 · 14 comments
Closed

Support for libwebp and libheif #7

wilg opened this issue Sep 16, 2020 · 14 comments

Comments

@wilg
Copy link

wilg commented Sep 16, 2020

Would it be easy to add support for libwebp and libheif to this buildpack?

I haven't fully understood Docker yet, so I haven't had much luck myself.

@brandoncc
Copy link
Contributor

I think so, yes. I will work on that for you.

@wilg
Copy link
Author

wilg commented Sep 16, 2020

😍 Thanks so much!

@brandoncc
Copy link
Contributor

I made an attempt at this, but vips doesn't want to compile with libheif-dev. I opened an issue on libvips, and I am hoping that I will be able to get this together for you soon.

@wilg
Copy link
Author

wilg commented Sep 20, 2020

Wow that's great, thanks! Do you mind linking the issue so I can follow along?

If you have a branch or something with only libwebp that's still enough to be super useful for me!

@brandoncc
Copy link
Contributor

@wilg libvips/libvips#1825 was the issue.

I just pushed the updated buildpack. You should have webp and heif after your next deploy. If you would like to see how I did it, check out fd24031.

@brandoncc brandoncc reopened this Sep 21, 2020
@brandoncc
Copy link
Contributor

I had to revert the commit because ruby-vips was broken, I'll try to get this back into master today.

@wilg
Copy link
Author

wilg commented Sep 21, 2020

Awesome thank you so much!

@rjherrera
Copy link

hi @brandoncc thank you for the update!! I found myself needing the same for webp, any news on the support for those libraries?

@brandoncc
Copy link
Contributor

I'm sorry for the delay! I worked on this some more today. I have everything compiling, and vips says it can open heif files, but when I try, it tells me that the file is not a known file format.

I have the work in a PR if anyone wants to try it in their application, but I don't believe it will work yet.

I opened another issue on the libvips repo, and hope John can help me get this working. libvips/libvips#1945

@maxence33
Copy link

Hello all,
I have this buildpack in my Heroku app and everything was working fine until a recent deploy (I don't deploy often so can't tell when it started to break)
With the following error :

E: Unable to locate package libheif

! Push rejected, failed to compile Apt app.

! Push failed

I have not changed stack, and am still on 18.
Also my Apt file is as below :

webp
libglib2.0-0
libglib2.0-dev
libpoppler-glib8
libheif

and my buildpacks order :

https://github.com/mojodna/heroku-buildpack-jemalloc.git
https://github.com/brandoncc/heroku-buildpack-vips
https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku-community/apt.tgz
heroku/ruby

I had done this Aptfile a long time ago and it is stlightly different than the one recommended (mostly no Webp or libheif reference)
Should I match the recommended Buildpack without losing Webp support ?

@brandoncc brandoncc reopened this Mar 12, 2021
@brandoncc
Copy link
Contributor

Hi @maxence33,

There is a PR which should fix libheif compatibility. I just haven't had time to test it. I'll get that done today and get back to you.

@maxence33
Copy link

maxence33 commented Mar 12, 2021

Fantastic. Yet Webp used to work with this buildpack in the past. (I think both with ImageMagick and Vips through ROR gems Shrine and ImageProcessing)
Any reason why this Issue was raised first place ?

(I mean Libheif and Webp from my Apt file were kinda working ?)
(Sorry I am not very at ease with buildpacks)

@maxence33
Copy link

Oh I think I am kinda mixing Libheif and Webp.
Probably Webp from my Apt file still build correctly.

I may just remove Libheif for now, while the PR is up, as I don't think I actually need handling HEIF and AVIF files.

@brandoncc
Copy link
Contributor

@maxence33 I think you are right, I was really surprised to hear that this buildpack had helped you with webp. Now that this is merged, You may not need webp in your apt file anymore.

@wilg @rjherrera @maxence33 I sincerely apologize for this taking so long. I just merged. Let me know if any of you experience any issues.

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

4 participants