WEEE-Open / skeeelled

An e-learning platform for the modern age
https://weee-open.github.io/skeeelled
6 stars 7 forks source link

Frontend sahircan textinput #123

Closed sahircansurmeli closed 2 years ago

sahircansurmeli commented 2 years ago

Solves #48 and #97:

If the user provides a web url instead of uploading an image, the file size does not get checked. Providing urls with very large images (~50 MB) does not hurt the performance, as they are handled and scaled by the browser's native <img> component. However, the content of the image will still be downloaded no matter how large the image in the provided url is. This might increase data usage drastically on the client side. We cannot make a HEAD request (to get the file size) from the browser because of the CORS policy.

One possible solution to this issue might be checking the image links in the backend, and not rendering the image, rather showing only the url, if the file is larger than a certain size.