﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses
65987	Media Editor Modal: track the original attachment id for edited images	ramonopoly		"This ticket tracks the work for the following issue:

[https://github.com/WordPress/gutenberg/issues/78077 Media: Tracking the relationship between original images and their cropped derivatives]

And PR:

[https://github.com/WordPress/gutenberg/pull/81803 Media: track the original attachment id for edited images- #81803]


When Gutenberg crops an image, Core's `/edit` creates an entirely new attachment with no stable pointer back to the image the lineage started from. 

`parent_image` records only the immediate source; there is no root/original reference across crop-of-crop chains. 

That means we can't navigate a crop back to its original in a performant way, that is, without getting each post up the change where `parent_image` exists.

[https://github.com/WordPress/gutenberg/pull/81803 Media: track the original attachment id for edited images- #81803] proposes to add a dedicated postmeta key `_wp_attachment_original_id` stores the root id.

There's no conflict with the current ""restore image"" functionality in the media library, which is file-based.


"	enhancement	new	normal	7.2	Media	trunk	normal		has-patch has-unit-tests		
