D
D
Dmitry Nesterov2021-07-13 16:57:10
PHP
Dmitry Nesterov, 2021-07-13 16:57:10

How to display an svg icon on a photo using the GD library?

Is it possible to somehow display the SVG icon on the photo, and not png or jpg? I couldn't find anything in the PHP documentation about this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2021-07-13
@Stalker_RED

GD doesn't read svg files. You can pre-convert to png or gif and then apply it as a watermark, there are plenty of examples .
If you need to overlay a limited number of images, you can convert manually.
If you need it dynamically, you can use imagemagick, for example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question