Skip to content

Auto-generate transforms for fields inside of Content Block fields #305

@alexroper

Description

@alexroper

Is it possible to auto-generate an image transform for a field inside of the new Content Block field type introduced in Craft 5.8?

https://craftcms.com/docs/5.x/reference/field-types/content-block.html

I've tried the following inside of the imager-x-generate.php config, but this doesn't seem to work.

return [
    'fields' => [
        'contentBlockField.image' => [
            'transformName',
        ],
    ],
    'elements' => [
        [
            'elementType' => \craft\elements\Entry::class,
            'criteria' => [
                'section' => ['blog'],
            ],
            'fields' => ['contentBlockField.image'],
            'transforms' => [
                'transformName',
            ]
        ]
    ]
];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions