Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

image (migration step)

Puts an image of the migrations folder into an image attribute of an object, with its alternative text, focal point and crop rectangle.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/migration-steps/image.md

On this page

image

Puts an image of the migrations folder into an image attribute of an object, with its alternative text, focal point and crop rectangle.

A step of a YAML migration with type: image. The class expMigrationStepImage (kernel/classes/migration/steps/expmigrationstepimage.php) is registered in settings/migration.ini [StepSettings] StepTypeList[image].

Keys

KeyTypeDefaultWhat it is
objectidentifier (object)the object (or node:)
nodeidentifier (node)a node of the object (or object:)
fieldstringrequiredthe identifier of the attribute (ezimage)
filestringthe image: a path below the folder of the migration file (left out: the image the attribute has stays)
altstringthe alternative text of the image
focalanythe focal point: { x, y } as fractions (0 to 1) of the width and height; null removes it
cropanythe crop rectangle: { x, y, width, height } as fractions of the original; null removes it
languagestringthe translation that gets the file (default: the default language of content)
in_placeboolfalsetrue: the published version is changed in place, without a new version
missingstring: fail, skip"fail"what happens when the object is not there: fail (the default) or skip
workflowsboolfalsetrue: the workflows of the operation's triggers run, as in the administration (default: they do not)
notifyboolfalsetrue: the publish makes a notification event (default: published without notification)

Besides these, every step takes the keys of the engine: type, mode, if, references, environments, engines and comment (the file format). A key of type identifier names a node, an object or another part of the installation by id, remote id, path or name (identifiers).

Values for references

references: { <name>: <value> } keeps a value of the step's result as ${ref.<name>} for the steps and migrations after it:

ValueWhat it is
object_idthe id of the object
node_idthe id of its main node
remote_idits remote id
versionits current version
nameits name
paththe url path of its main node
changedtrue when the step changed the object

Undoing

A step of this type does not undo itself: a migration with it needs down: or a rollback to its caption.

Caches it touches (cleared after the run): content.

Example

- type: image
  object: remote:news-welcome
  field: image
  file: images/welcome.jpg
  alt: The team at the opening
  focal: { x: 0.3, y: 0.4 }

Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationstepimage.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x