mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
407 stars 91 forks source link

generating smaller copies of images #46

Open jelmer opened 6 years ago

jelmer commented 6 years ago

It would be great if there was a way to automatically generate smaller photos for use in e.g. image grids.

When including high-resolution images, a page with an image grid with a dozen photos can become quite bulky (and slow to load over some connections).

mosra commented 6 years ago

Hi, this was on my roadmap from the very beginning -- hooking into Pelican output generation, intercepting copies of static files and generating thumbnails for all images. However, with todays responsive web design, huge range of resolutions, screen sizes and pixel densities, it's hard to define how big a thumbnail should be. This is how I think it could be done:

I think first and/or second option could be done rather quickly, the third taking a bit of time. Unfortunately I managed to get myself quite a lot of work for the next month, so I can't give you any estimate when this can land. (Contributions welcome, of course ;))