-
Improvement
-
Resolution: Fixed
-
Minor
-
2.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
MDL-32471-thumbnails -
Filepicker needs to display image previews (thumbnail) of internal images.
The work consists of following parts:
1) We need to implement resizing of images to thumbnail size and storing them. There should be URL that returns thumbnail instead of a file. So far it seems that the best way to do it is to add parameter to pluginfile.php, something like
http://WWWMOODLE/pluginfile.php/296/mod_folder/intro/Cloud%2C.jpg?size=thumb
When the thumbnail is requested we check if it exists and was modified after the file was modified and return it. Otherwise generate and store new thumbnail.
AFAIK Dongsheng was working on such temporary storages.
There should be cron that cleans old thumbnails.
Another question is how many thumbnail sizes do we want to store. For Filepicker we really need two: bigger thumbnail in "icon view mode" (90x90 seems to be a good size here) and smaller icon for "table/list view mode" (16x16). Probably we don't need to store 16x16, we'll just ask browser to scale bigger thumbnail image. MD was suggesting to store something in between (i.e. 75x75), scale it up for thumbnail and scale down for icon.
2) local repositories (local, recent, user, filesystem, coursefiles) shall return for each file not only URL of filetype image ('thumbnail') but also URL of generated thumbnail (i.e. 'realthumbnail')
3) repository/filepicker.js must implement lazy loading of the real thumbnails. When page is displayed the 'thumbnail's are shown and filepicker starts requesting in background the images of 'realthumbnail's and replace them.
- caused a regression
-
MDL-33467 Images not displaying in question previews
- Closed