daltons
daltons copied to clipboard
a command-line tool that computes optimal image widths to put in srcset attributes of responsive images
As most Analytics solutions only provide viewport widths and nothing about screen densities, this would help use Daltons without requiring addition of custom dimensions months in advance. For example, we...
For example, allow settings rounded screen densities to `[1, 1.5, 2, 2.5]` Aims: - reduce computing time (much less combinatorial) - prevent serving images to really high density screens
- [ ] add configuration by file (see [Building Configurable CLI Apps ](https://github.com/yargs/yargs/blob/master/docs/advanced.md#configuration) in Yargs‘ documentation) - [ ] configure multiple runs in one single configuration file
Should help reduce computing time
Currently not compatible, staying on v4.x https://github.com/adaltas/node-csv/blob/csv-parse%405.0.0/packages/csv-parse/CHANGELOG.md#500-2021-11-15
It looks like Google Analytics' own "Browser Size" dimension we dismiss [here](https://cleverage.github.io/daltons/step1.html#sending-data-to-the-analytics-solution) gives a smaller viewport width than our own computed value: I guess it doesn't include the scrollbar width....
Screen with >`2dppx` density require lower quality, more compressed, images: https://observablehq.com/@eeeps/visual-acuity-and-device-pixel-ratio It might be better having different images widths for high density screens (most being mobiles) and low density screens....