Set Canonical URL to GIF for Facebook
I’m creating a gif hosting user frontend submission site. For Facebook to correctly animate a GIF on their platform, the og meta tag needs to be redirected to the specific gif. I can remedy this by manually adding the gif url as the canonical link and it will work.
However, dynamic posts from multiple users, I will need to reference that gif as canonical in order for it to work.
What would be the best method to do this?