0

I'm encountering an issue with adding an SVG image to Laravel Dompdf. The image appears in black and white instead of its original colors. How can I resolve this?

Image file

I added this code in the Blade file.

<img class="logo" src="{{ public_path('storage/' . $settings['horizontal_logo']) }}" alt="">

I would like to add a colour SVG image into a Laravel project in Dompdf.

1 Answer 1

0

This used to be a bug in SvgLib, but it seems to have been resolved by version 0.5.3. Have you tried updating your dependencies?

Source: https://github.com/dompdf/dompdf/issues/3245

Or, if at all possible, consider using a PNG or JPEG format since they are usually easier to control in PDF, where the sizes generally don't vary too much.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.