Hi @bernhard,
Hope I can explain this well enough: I have several RPB blocks that contain image fields (some are single image, others multiple images).
I used your VScode snippets to create the image field in the block's $rm->migrate() method, e.g:
self::image => [
'type' => 'image',
'label' => 'Image',
'maxFiles' => 1,
'descriptionRows' => 1,
'extensions' => 'jpg jpeg png',
'maxSize' => 3, // max 3 megapixels
'maxWidth' => 1200,
'maxHeight' => 1200,
'icon' => 'picture-o',
'outputFormat' => FieldtypeFile::outputFormatSingle,
'gridMode' => 'grid', // left, list
],
But when I then add a new block to a page from the admin, it seems the image field isn't ready to accept images, either via the "Choose File" button, or via drag and drop. In fact it looks like this:
The Choose File button allows the selection of a file, but nothing is uploaded, and dragging/dropping does nothing. There are no JS errors in the console.
If however I save the page, the field seems to resolve itself and is then able to receive images:
I've tried various options, including saving the field again in the Admin, and copying/pasting the full RockMigrations Code from the field's Basics tab, but to no avail.
Have you any ideas?
Many thanks in advance,
Ian.