Insert/Edit Image

 Overview

The Insert/Edit Image tool is available on the default toolbar for the WYSIWYG Editor. The Images Gadget may also be used to drop an image on a page and will automatically spawn the Insert/Edit Image modal.

Classic Editor

Classic Image Icon

JustEdit

JustEdit Image Icon

The Insert/Edit Image tool provides access to multiple functions related to images, image management, and code markup for images. At the very simplest, it can be used to link to an image and provide a description for it, which is usually required. On the other hand, Insert/Edit Image can also be used to:

  • Upload an image and edit it with the Image Editor
  • Manually enter a URL of an image to insert on the page
  • Browse to an image that was previously uploaded in order to link to it, including the ability to choose from an auxiliary site
  • Provide metadata about an image in the form of an Image Description (alt tag) and Title (title tag)
  • Preview an image
  • Align an image
  • Add space or a border around an image
  • Assign a CSS class or styling to an image
  • Create an image swap with JavaScript
  • Specify an image map

When using the Insert/Edit Image tool, once an image has been selected for insertion on a page, the WYSIWYG Editor provides the HTML mark-up and the dependency tag for the link behind the scenes. A dependency tag can also be inserted from within the Source Editor. 

In addition to adding an image to a page, the Insert/Edit Image tool includes the Appearance and (for Classic Editor) Advanced tabs, which provide users with the ability to further manipulate images. The Appearance tab provides the ability to modify the alignment, size, and CSS styling of the image. The Advanced tab provides miscellaneous functionality for image manipulation with JavaScript and HTML, including the ability to swap images on mouse over, designate an image map, and add an ID to the IMG tag.

Inserting an Image

  1. To insert an image, position the cursor where the image should be inserted and click the Insert/Edit Image icon. This shows the Insert/Edit Image modal.

    Insert/Edit Image Tool
    Insert Image Modal

  2. The location of the image can be manually entered in the Image URL field, but to take full advantage of link management, click the Browse icon to browse to the image as in this manner the image will be assigned a dependency tag.Browse icon Insert Image Browse 
  3. The Select Image modal is shown. Edit ImageNote that the view of the images can be toggled between a list and thumbnail view by clicking the icons to the right of the Filter field.
  4. An image can be selected by doing one of the following:
    • Navigating the folder structure via the breadcrumb links. This includes being able to navigate to another site within the account.
    • Uploading an image.
    • Uploading and editing an image.
    • Selecting a different environment from the drop-down; such as the production server or publish target. Staging is the default when Binary Management is in effect. 
    • Selecting an auxiliary site from the drop-down.
    • Filtering by entering one or more characters. The filter is relevant to the file name, including extension. 
    • Filtering by adding tags.
    • Switching between list view and thumbnail view.
    • Previewing in the preview pane by single-clicking.
    • Double-clicking to immediately select and insert.
    • Viewing the preview pane content details
    • Clicking through the Edit Image link to edit an image. After editing, click save to return to the Select Image dialog. This edits the physical file and can be useful for quick resizing of an image.
  5. Once the image has been selected, click Insert. Alternatively, double-click an image in the list or thumbnail view.
  6. From the Insert/Edit Image modal, enter a value for the Image Description field.
  7. Click Insert. The image is shown in the context of the page within the WYSIWYG Editor.

Note: When linking to an image or other binary file from staging the file must be published to production. This can be accomplished by making sure that the Include Unpublished Dependencies checkbox is selected.

Editing an Inserted Image

The details of the image can be modified after insertion on a page by clicking the same Insert/Edit Image icon, making the necessary edits, and clicking Update.

Dragging a File to Upload

  1. As described above, click the Insert/Edit Image tool, and the Browse icon.
  2. From the Insert Image modal, click Upload.
  3. Drag the file or files to upload from the local computer to the modal. (Multiple files may be selected and uploaded at one time. On a PC, use Control+Click, Shift+Click, or click and drag to select multiple files. For a Mac, use the Command key to select multiple files.)

    Drag & Drop Feature
  4. Alternatively, click the Add Files button to browse and select local files.
  5. If necessary and available, chose an access group for the files. This will limit the ability to access the image to insert it on a page from within the WYSIWYG to members of the group.
  6. The ability to overwrite files may be enabled and available by clicking the Overwrite Existing checkbox.
  7. Files may be renamed at this point by clicking Rename, entering the new file name, and pressing the Enter key or clicking out of the field.
    Upload Rename RevertNote that if there are invalid filenames or the file exists already and Overwrite Existing has not been checked, the modal will not allow the upload to be initiated.
  8. Click Start Upload to upload the files. When completed, the green success message is displayed. Click Close and select and insert the image from the Select Image modal.

Upload Success

Additional Information and Reminders

  • Adding an image description is important for accessibility, as it provides text for screen-readers or other instances where the image is unable to be viewed 
  • The ability to upload files is inherently available for user levels 6 or above. Lower level users (1–5) can be granted the rights to upload via the user’s settings. 
  • The permission to overwrite files to which they have access can be granted to user levels 1 through 8, and is inherently available to user levels 9 and 10.
  • To import multiple files using only one selection and containing subfolders, use the Zip Import feature.
  • Zip Import is available to users Levels 6–8 through the user’s settings.
  • Note: All binary files including images are uploaded to the staging server and must be published to the public-facing web server. Image files can be manually published with any publish action, or if having been inserted on a page without publishing, the Dependency Manager will provide a checkbox on the Publish modal so that any unpublished dependencies are also published.

Decorative Images

Decorative images are images for which no <alt> descriptive image tag is required. Inserting decorative images must be enabled for each site by an administrator. This can be accomplished from Setup > Sites > WYSIWYG Editor > Decorative Images. The default, Disabled, means that the Decorative Image checkbox is not available and that an Image Description must be added.

For more information, visit the Setup Sites > WYSIWYG Editor Panel page.

Using Decorative Images

Once enabled, the Insert/Edit Image modal in the WYSIWYG editor allows users to select a checkbox indicating that the image to be inserted is a decorative image and to omit the image description.

Appearance Tab

The Appearance tab allows for configuring the alignment, size, and styling of the image. 

Insert/Edit Image Browser
Appearance Tab

 

The following Appearance settings can be configured:

  • Alignment: Sets the alignment of the image against the text. Options include:
    • Baseline: Aligns the baseline of the image with the baseline of the parent
    • Middle: The image is placed in the middle of the line of text
    • Top: The top of the image is aligned with the top of the tallest element in the line
    • Bottom: The bottom of the image is aligned with the bottom of the lowest element in the line
    • Text Top: The top of the image is aligned with the top of the parent element
    • Text Bottom: The bottom of the image is aligned with the bottom of the parent element's font
    • Left: The image is set to the left of the text with wrap-around
    • Right: The image is set to the right of the text with wrap-around
  • Dimensions: Sets the height and width of the image. The Constrain Proportions checkbox can be selected in order to keep the same proportions of the original image 
    • In JustEdit, the dimensions are listed under the General tab
  • Vertical Space: Sets the amount of space between the top and bottom sides of the content area and the image
  • Horizontal Space: Sets the amount of space between the left and right sides of the content area and the image
  • Border: Sets the width of the image border. The border width will be the same on all sides of the image
  • Class: Allows for a class attribute value to be selected from the drop-down, which can be configured
  • Style: Based upon the options selected from the Alignment drop-down, the styling will auto-complete. Optionally, styling may be manually added to define the alignment and other features for the image.

Advanced Tab

If you are using the Classic Editor, the Insert/Edit Image modal also contains an Advanced tab. It provides easy access to JavaScript and HTML with the ability to swap images on mouse over, designate an image map, and add an ID to the IMG tag.

Advanced Tab

Swap Image

The Swap Image area includes a checkbox that, when selected, allows for adding a second image that replaces the original image when a user hovers over the image. The two options for this feature are to specify the alternate image on mouse over or on mouse out. For either option, the alternative file can be browsed to with the file chooser.

  1. While editing a page in the WYSIWYG Editor, click Insert/Edit Image.
  2. Click the Browse icon and select the image to appear on the page when it is initially loaded.
  3. Click the Advanced tab.
  4. Select the Alternative Image checkbox.
  5. From either the For Mouse Over or For Mouse Out, browse to the alternative image.
  6. Insert the image, and save and publish the page.

Initial Image

Initial Image

Image Swap After Hover

After hover, image swap.

Miscellaneous

This area includes the ability to add the HTML id tag to the img tag. It also includes:

  • Add the HTML id tag to the img tag
  • Select the language direction with a drop-down
  • Designate the language code
  • Specify an image map
  • The long description link field

ID

Specifies the value of the id attribute for the image. In previous incarnations of HTML, the name attribute on an <a> element was used to create an anchor and target it. For conformance with HTML5, the id attribute is preferred over the name attribute. For OU Campus pages the id should at least be unique to a page. The id attribute is flexible in implementation and can provide a specific target for an element, including for on-page linking within a document. An id can also be used as a target by scripts. Another usage of ids is to style an element with CSS, or to bookmark or footnote a document.

An id attribute:

  • Is a global attribute in HTML5
  • Must be a unique value relative to the "element's home subtree"
  • Must contain at least one character
  • Must not contain any space characters

Language Direction

Specifies the text direction (dir attribute) for the image. The HTML specification suggests that the use of dir is preferred over specifying text direction with CSS. It also allows for the value of the attribute to be "auto" but does not prefer it, even though the auto value allows for the direction to be determined programatically. The HTML specification provides an example of tagging that uses the value of auto for the dir on a paragraph. The first word of the paragraph is tagged with <bdi>, meaning that this particular word can go in either direction. An example would be differentiating between English, a left-to-right language, and Arabic, a right-to-left language. When rendered, the English language text is left aligned to the starting edge of the paragraph and the Arabic to the right. This includes the changing of the order of the <bdi> tagged words. 

Language Code

Specifies the primary language (lang attribute) for content of the element, in this case a hyperlink and for any element attributes that contain text. The lang attribute is considered a global attribute in HTML5. "Its value must be a valid BCP 47 tag, or empty string. Setting the attribute to the empty string indicates that the primary language is unknown... If these attributes are omitted from an element, then the language of this element is the same as the language of its parent element, if any." 

See this specification for specifics when using with XML or for using xml:lang: attr-lang.

Image Map

In HTML and XHTML, an image map is a list of coordinates relating to a specific image, created in order to hyperlink areas of the image to different destinations (as opposed to a normal image link, in which the entire area of the image links to a single destination). For example, a map of the world may have each country hyperlinked to further information about that country. The intention of an image map is to provide an easy way of linking various parts of an image without dividing the image into separate image files.

To use the image map feature in the advanced properties of the WYSIWYG image insert tool, the web developer must have first created a properly coded image map with the appropriately defined hotspots in the HTML of the target web page. The image map must be named (e.g., name="navmap"). Once this is done a user can, in the WYSIWYG Editor, click the Insert/Edit Image tool, choose the appropriate image, go to the Advanced tab, and type in the name of the image map.  This name must be preceded by a # character (e.g., #navmap). Now the image is associated with the image map.

Due to the nature of image maps (dimensions are hard set for the hot-linked areas of an image), an image must be of the proper dimensions to support the map, as well as have the image content that maps to the areas that are defined in the image map (e.g., an image of Canada would be useless for an image map defined for the United States).

How to Add a Mapped Image

  1. To add a image map to the page, use the WYSIWYG Insert/Edit Image tool.
  2. From the Insert/Edit Image dialog box, click the Advanced Tab.Image Map
  3. In the Image Map field type in the name of the image map. It is very important to keep in mind that a hash tag (#) must be placed at the beginning of the image map name in this field. For example if the developer used the name navmap, the user would type in: #navmap.
  4. Once the correct name has been inserted for the image map click Insert and the new mapped image will appear in the WYSIWYG Editor.

Long Description

The long description field  specifies a hyperlink to a detailed description of an image.