I have a SVG path defined. I want to animate an image on that path. I can animate an object using <animateMotion>tag. But I can't figure out how to do that with an image.
Here is my svg path:
<svg id="svg" height="1746px" width="100%">
<path d="M 100 50 Q 100 150 200 220 L 650 630 C 700 670 700 700 650 730 C 390 850 390 1000 580 1000
Q 800 1000 900 1450 Q 900 1550 800 1550 L 300 1585 Q 160 1620 160 1740"stroke="black" stroke-width="30" fill="none"
id="animatePath"/>
<img src="car.png" id="car">
<animateMotion xlink:href="#car" dur="10s" repeatCount="indefinite" begin="0s">
<mpath xlink:href="#animatePath"/>
</animateMotion>
</svg>
Thanks for any suggestions.