Huh! This is interesting!
I need to explain a bit about the naming conventions of image filenames in PW, I think.
Beginning after the basename, with the first dot, every dot indicates an imagevariation that also exists as a file. (only the last dot leads to the file-extension)
Every previous part in the chain is the [source | parent | original] of the actual part.
The tags chain, implemented into PW around 2.5 and made to become very robust and foolproofed by Ryan around 2.6, was meant to be used as lowercase tags, concatenated by - chars. This very restrictive usage is due the valid filename characters (lowercase), and the preserverd dot, and to prevent concatenating multiple same tagnames. (this is cleaned up to become unique in the filenames).
But this is not very userfriendly in cases like the CropNames, and the users are not aware of this restrictions why it is / would be important to follow them.
Thats why I have to handle the cropnames less restrictive. Thats also the reason why the implemented tag system in PWs imagenames cannot be used like intended. All the cool methods to get the variations of a parentimage (getVariations(), isVariation()) will fail in many cases when using images with an (invalid) tagname / cropname!
That's why I was happy to find another bulletproof solution for getting rid of the srcset variations. (Detecting the children of a crop-parent)
@PWaddict The way you uses it isn't an intended one. You create different INTERMEDIATE crops. The intended way is to create 1 INTERMEDIATE crop image, that serves as parent for the derived variations. But this intermediate functionality also is obsolete and will become deprecated in the next version, as it isn't much useful but leads to code bloat and confusion.
Also it sin't possible to detect derivatives of that sort. Imagine a setup with 3 cropnames: test & test-portrait & test-landscape.
As we have already read above, people do this a lot, using invalid cropnames / tagnames, with - chars or Camelcase, etc.
Now go select and create a new crop of the "test" cropname. It will errorinously also delete all variations of test-portrait and test-landscape. Also image variations that may have the cropname on another place in the filename will get deleted too.
The only way to detect variations is to keep the parent-children relation. (Blood is thicker then water, )
Maybe you can use it this way:
$thumb_master = $photo->photos_main_photo->getCrop("thumbnail");
$thumb_medium = $thumb_master->width(660);
$thumb_small = $thumb_master->width(480);
$thumb_x_small = $thumb_master->width(360);
This is the intended way that brings you back into sync with the system.