Skip to content
This repository has been archived by the owner on Aug 20, 2023. It is now read-only.

Remove Image Magick dependency, or allow for custom configuration. #17

Closed
aj-adl opened this issue Aug 10, 2021 · 1 comment
Closed

Comments

@aj-adl
Copy link

aj-adl commented Aug 10, 2021

Having used this for a while now, when porting to new dev environments the imagemagick dependency is super annoying. There's issues surrounding compiling php-imagick on M1 macs, it's not included by default in a lot of environments etc.

It's a big dependency for a tiny part of the functionality - QR codes are rarely generated as part of the usual operation of the site, only on initial setup etc

Is there a particular reason why the default can't be the SVG QR code generator that Bacon provides?

It would be a roughly 3-4 line code change within the src of this to enable, I'd be happy to provide a PR.

The bigger questions is, should developers be able to set this themselves? To me the whole benefit of building something on top of Laravel is that they have solved these problems for us - just newing up the Google2FA instance inside methods is a big anti-pattern in a Laravel environment. The 'proper' way to do it would be to register this against the container and let Laravel's DI resolve it, which would also enable people to override the service if they wanted to tweak it further (change the config of the libraries you're relying on etc).

@jcohlmeyer
Copy link
Contributor

Well, right now the frontend is dependent on a base64 encoded image in order to work. I will look into what it would take to be able to support SVGs for the frontend of the CP.

jcohlmeyer added a commit that referenced this issue Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants