有没有办法为现有的图像关系触发cropVariants的生成或更新?
我的用例:我想确保图像始终遵循特定的纵横比。因此,我为图像定义了一个名为“myCropVariant”的cropVariant,例如在页面和一些自定义表格中。这基本上工作正常,我在“创建图像关系”对话框中看到一个新向导,我可以在其中选择cropArea,即使我不单击该向导,cropVariant 图像以及cropVariant 数据库记录也会尽快创建当我保存父记录时,使用图像的中心作为裁剪区域。前端输出也可以正常使用
<f:image cropVariant="myCropVariant"/>
问题是:我将大量内容从另一个网站导入数据库(使用自定义迁移 CLI 命令)。这也包括图像;我已经创建了相应的sys_file
记录和参考。图像在前端渲染得很好,但没有使用cropVariant。那是因为它在数据库中不存在,因为没有人点击后端中导入的内容。现在从 TYPO3 外部通过迁移脚本创建它们在理论上是可能的,但会非常讨厌(因为需要知道图像尺寸等等),所以我通过 CLI 或其他东西通过 TYPO3 寻找最佳实践相似的。