$builder->tap($builder->callback(function ($parent, $args) {
// YOU CAN SET A XDEBUG BREAKPOINT IN THESE CALLBACKS TO CHECK THE VALUES.
// Load the file object from the field.
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:YOUR_ENTITY_TYPE'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('YOUR_FIELD_NAME.YOUR_FIELD_PROPERTY')),
$builder->tap($builder->callback(function ($parent, $args) {
// YOU CAN SET A XDEBUG BREAKPOINT IN THESE CALLBACKS TO CHECK THE VALUES.
// Load the image style derivative of the file.
$builder->produce('image_derivative')
->map('entity', $builder->fromParent())
->map('style', $builder->fromValue('YOUR_IMAGE_STYLE')),
$builder->tap($builder->callback(function ($parent, $args) {
// YOU CAN SET A XDEBUG BREAKPOINT IN THESE CALLBACKS TO CHECK THE VALUES.
// Retrieve the url of the generated image.
$builder->produce('image_style_url')
->map('derivative', $builder->fromParent()),
$builder->tap($builder->callback(function ($parent, $args) {
// YOU CAN SET A XDEBUG BREAKPOINT IN THESE CALLBACKS TO CHECK THE VALUES.