Exporting linked images as shared references

Linking frames is a neat feature to resuse existsing frames in a clean way.
However, when exporting an animation with linked frames, Aseprite creates duplicates instead of reusing the first occurance of the linked frame.

I would love that to be an export option. How this would look like in the export is that the resulting image file would only export a linked frame once and re-reference it in the JSON; like so:

{ “frames”: {
“wizard_staff 0.ase”: {
“frame”: { “x”: 0, “y”: 0, “w”: 100, “h”: 80 },
“rotated”: false,
“trimmed”: false,
“spriteSourceSize”: { “x”: 0, “y”: 0, “w”: 100, “h”: 80 },
“sourceSize”: { “w”: 100, “h”: 80 },
“duration”: 100
},
“wizard_staff 1.ase”: {
“frame”: { “x”: 0, “y”: 80, “w”: 100, “h”: 80 },
“rotated”: false,
“trimmed”: false,
“spriteSourceSize”: { “x”: 0, “y”: 0, “w”: 100, “h”: 80 },
“sourceSize”: { “w”: 100, “h”: 80 },
“duration”: 100
},
“wizard_staff 2.ase”: {
“frame”: { “x”: 0, “y”: 160, “w”: 100, “h”: 80 },
“rotated”: false,
“trimmed”: false,
“spriteSourceSize”: { “x”: 0, “y”: 0, “w”: 100, “h”: 80 },
“sourceSize”: { “w”: 100, “h”: 80 },
“duration”: 100
},
“wizard_staff 3.ase”: {
“frame”: { “x”: 0, “y”: 80, “w”: 100, “h”: 80 },
“rotated”: false,
“trimmed”: false,
“spriteSourceSize”: { “x”: 0, “y”: 0, “w”: 100, “h”: 80 },
“sourceSize”: { “w”: 100, “h”: 80 },
“duration”: 100
},
“wizard_staff 4.ase”: {
“frame”: { “x”: 0, “y”: 240, “w”: 100, “h”: 80 },
“rotated”: false,
“trimmed”: false,
“spriteSourceSize”: { “x”: 0, “y”: 0, “w”: 100, “h”: 80 },
“sourceSize”: { “w”: 100, “h”: 80 },
“duration”: 100
}
}, (…)

Where “wizard_staff 1.ase” and “wizard_staff 3.ase” are linked together.
I have a custom importing pipeline in my engine where I would then detect frames referencing the same image and reuse that frame in its animation - significantly cutting down on the memory usage.