Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question