Closed robertvandeneynde closed 6 years ago
Yeah, this is issue #54. I'll think about this after the ongoing v2
rewrite, but for now I can't dedicate time to it. :-(
(If you have more thoughts, feel free to continue at #54.)
I think I will first code a url on my server and redirect it to alg.cubing.net, then maybe it will be easier to merge it later !
I think I will first code a url on my server and redirect it to alg.cubing.net, then maybe it will be easier to merge it later !
Will be glad to see what you come up with!
I will probably be very picky about shipping anything to production if the images don't look exactly like they do on the website, but it would certainly be nice to have somewhere to start from.
When sharing a link on facebook or Whatsapp, the image is not very useful, we see a solved cube, that's probably not what we want. I suggest when the url has the query parameter "type=alg", the image should be the intial state of the cube (ie. what it solves).
For example I share this nice OLL : https://alg.cubing.net/?title=Untying%20(OLL)&stage=PLL&type=alg&alg=F_R_U-_R-_U-_R_U_R-_F-
The preview would be with the title "Untying (OLL)" with this image :
This has to be server side unfortunately but i suggest that the server would write this properties :
For the image, a separate url "initial-state" would be coded on the server to generate the image, the browser would cache it, but if performance is concerned, the image can be cached on the server. The image size can be quite small, well, being a cube. But one could look at Facebook/Reddit recommendation here or here.