@aleksei Sounds like potentially a cool idea. But also potential for abuse. For e.g. many forum admins invest significant effort to foil file scrapers, etc. and this could facilitate/exacerbate. Maybe mitigated to some degree by permission restrictions to logged in users but..... then the bots just create a sock puppet account.
Another potential issue: long running threads sporting hundreds of images, etc. How to display? Could be a UX conundrum, eh?
Hmmmm... Still could be interesting for some situations.
Not a dev but will hazard a guess that this might should be a plugin rather than core front end function as you suggest. Sorry I cannot offer more targeted insights.
Just testing YouTube video embedding and code block snippets:
10 of the Milky Way's Most Interesting Stars
Scan Value (edge) length for each Key (node) to
out_edges = defaultdict(int)
for node, edges in adjacency_dict.items():
# Additional check for an edge that has no out edge.
for edge in edges:
if edge not in out_edges:
out_edges[edge] = 0
out_edges[node] = len(edges)