Format media action
- Updated: 2025/10/29
The Format media action enables you to adjust the appearance and settings of images and videos on a Keynote slide, allowing you to apply styling and alignment options to customize how media is displayed in your presentation.
Settings
- Use the Session name field to select one of the following
options:
- Session name: Enter the name of the session used
to open the presentation with the Open
action.
(Optional) Click the Insert a value icon to select an existing variable that you have used to store the default session name.
- Variable: Enter the name of the variable that you have used to store the session name.
- Session name: Enter the name of the session used
to open the presentation with the Open
action.
- In the Media details option, specify the following
details:
- File info: Specify the file name of the media with the extension as
mentioned in the Keynote slide.Note: On your Keynote slide, click the image and go to the Image section on the right-hand side to view the file information.
- X coordinate and Y coordinate: Specify the X and Y coordinates to set the position of the media. X (from left) sets the horizontal position; Y (from top) sets the vertical position. Coordinates (0,0) start from the top-left corner of the slide. Increase X to move right, Y to move down.
- File info: Specify the file name of the media with the extension as
mentioned in the Keynote slide.
- In the Format options, select one of the following
settings to format your media.
- Basic: Set either Width or Height. The other dimension adjusts automatically to preserve the aspect ratio.
- Script: Specify formatting instructions for the media object using AppleScript. See Example script syntax and structure.
Example script syntax and structure
You can use the Script option to specify instructions to format a media
file in the Keynote. Instead of filling out separate form fields (like X
coordinate, Y coordinate,
Width, or Height), you can write a
short command block that defines how the action should
behave.
Note: When specifying a script, the properties
within quotation marks currently cannot be set. For example,
set description to "this is the added description"A typical script uses simple key-value pairs or function-like commands to specify the
properties of a specific media. A general script to format an image looks like
this:
set position to {100, 100}
set width to 600
set height to 400
set opacity to 90
set reflection showing to true
set reflection value to 100
set rotation to 10
set locked to trueA general script to format a video looks like
this:
set position to {100, 100}
set width to 600
set height to 400
set movie volume to 0
set opacity to 80
set reflection showing to true
set reflection value to 20
set repetition method to loop
set rotation to 20
set locked to false