Open klemens-u opened 8 years ago
Broadcasting JS events would be the obvious choice, but depending on browser support this will add extra bloat to Rimg. I think I need to rewrite some stuff to re-evaluate which features to support in Rimg and which would be the best approach. Until then I would advise to do something like:
img:not([src]) { /* CSS animation code*/}
but I understand that when the load starts I need to do something. Perhaps I can add a class to show the progress part and remove when it is finished.
Yes, JS events would be very nice. Your css does not work for me as I always assign src with a small blank inline image because I need validated html. (src is mandatory)
But it inspired me to come up with a different solution which solves two issues for me at once. I now use a loading gif as src. So on one hand src is'nt empty, on the other hand the loading animation is shown until rimg loads the correct image.
That works even better (for now), will focus on css-classes while JS-events add to much bloat (due to exceptions).
It would be very nice to have a loading progress animation. Currently if you scroll down quickly the are a lot of blank "holes" in den page (still unloaded images) which is rather confusing for the visitor. Any ideas?