Improved imageSuffix settings in config.lua

The current implementation of imageSuffix makes no sense. The scaling factor should be the key of the imageSuffix table, not the value.

Here’s how it’s currently done:

[blockcode]
imageSuffix =
{
["@2x"] = 2,
["@3x"] = 3,
},
[/blockcode]

This makes no sense. Using the current scheme, it’s possible to define multiple suffixes for the same scaling factor, and impossible to define a common suffix for multiple scaling factors. So here’s what you CAN do, which is not helpful in any way whatsoever:

[blockcode]
imageSuffix =
{
["@2"] = 2,
["@2x"] = 2,
},
[/blockcode]

What does the above logic even do? I wouldn’t wager a guess on it, even though it’s legal by the current scheme.

Here’s what the current scheme will NOT let you do, which would be FAR more useful:

[blockcode]
imageSuffix =
{
2 = “@hd”,
3 = “@hd-subsampled”,
4 = “@hd”,
},
[/blockcode]

An even more useful implementation would let one specify multiple image suffixes per scaling factor:

[blockcode]
imageSuffix =
{
2 = { “@hd”, “@sd”, },
3 = { “@hd-subsampled”, “@hd”, “@sd”, },
4 = { “@hd”, “@sd”, },
},
[/blockcode] [import]uid: 71767 topic_id: 18738 reply_id: 318738[/import]