With Paligo, you can add and manage all of the images that you need to use in your technical communication. This includes images in the source language and also images for your translations.
There are 4 main types of image you can add: images, figures, inline images, and side-by-side images.
-
Use an Image if you want to use a picture without a title and caption (see Add an Image).
-
Use a Figure when you want an image with a
title
and acaption
(see Add a Figure). -
Use an Inline image to add a small picture that appears in the flow of the text, for example, an icon that appears inside a paragraph (see Add an Inline Image).
-
Use Side-by-side images to show two images next to each other on the same line, rather than stacked one above the other (see Add Side-By-Side Images).
Paligo supports a wide range of image formats, including:
-
AI (Adobe Illustrator)
-
EPS (Encapsulated Postscript)
-
GIF and animated GIF (Graphics Interchange Format)
-
JPEG
-
JPG
-
PDF (Portable Document Format)
-
PNG (Portable Network Graphic)
-
PS (PostScript)
-
PSD (Adobe Photoshop)
-
SVG (Scalable Vector Graphics)
-
TIF (Tagged Image File Format)
-
TIFF (Tagged Image File Format)
-
WebP
This section explains how to add a figure to a topic. A figure is a picture with a title and a caption, and it can support some DocBook elements that are unavailable for regular images. However, at the moment, most of these additional elements, such as calloutlist
do not have any functionality in Paligo.
Note
There are separate sections that explain how to Add an Image, Add an Inline Image, and Add Side-By-Side Images.
There are several ways to add a figure:
-
Select Insert > Figure and browse to the image you want to use, or upload an image file.
For details, see Add a Figure with Insert Menu.
-
Use the element context menu to add the figure element and then select the image placeholder and search for the image you want to use.
For more detail, see Add a Figure with Element Context Menu.
Tip
You can use Keyboard Shortcuts to add images, figures, inline images and side-by-side images.
If you prefer, you can add the elements for a figure manually, and for this, you can use the element context menu.
-
Place your cursor where you want to add a figure, for example, inside a
step
element or after apara
. -
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Add the
figure
element.Paligo adds the figure element and also adds the
title
,caption
,imageobject
andimagedata
elements that are needed for a figure. -
Right-click on the placeholder for the image and select Image browser.
-
In the dialog that opens, browse or search for the image in your Media library.
Note
If the dialog does not open automatically, right-click on the placeholder icon for the image and select Image browser.
Note
If the image is not in the Media library yet, you can upload it directly in this dialog by using the upload icon in the top-right.
To find out more about uploading images, see Upload Images.
-
Select the image to insert it into your topic.
Note
To use alt text in PDF outputs, it is important that you do not use tagged PDFs as images. For PDFs to use alt text, the layout has to have Generate tagged PDF enabled. The PDF processor cannot complete the publishing if your content contains tagged PDFs as images and Generate tagged PDF is enabled. You will need to use untagged PDFs as images or use different types of image files.
If you try to publish content that has a tagged PDF embedded as an image and the Generate tagged PDF enabled, you will get a "production failed" error.
-
Enter the text for the figure title in the
title
element. -
Enter a caption for the figure in the
caption
element. You can delete thecaption
element if you do not want a caption. -
Select Save.
This section explains how to add an image to a topic. An image is a picture without a title or caption, although you can add a caption manually if you prefer.
Note
There are separate sections that explain how to Add a Figure, Add an Inline Image, and Add Side-By-Side Images.
There are several ways to add an image:
-
Select Insert > Image and browse to the image you want to use, or upload an image file.
For details, see Add an Image with Insert Menu.
-
Drag and drop an image from your computer on to the topic. This will add the image and upload it into the Media library at the same time.
For more details, see Drag and Drop an Image.
-
Use the element context menu to add the media object element and then search for the image you want to use.
For more detail, see Add an Image with Element Context Menu.
Tip
You can use Keyboard Shortcuts to add images, figures, inline images and side-by-side images.
If you prefer, you can add the elements for an image individually, and for this, you can use the element context menu.
-
Place your cursor where you want to add an image. The position of the cursor is important, as you can only add an image where it is valid. For example, if you are inserting an image or figure, you could place the cursor after a
para
element. But if you are inserting an inline image, you would need to place the cursor inside thepara
element. -
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Add the
mediaobject
element.Paligo adds the mediaobject element and also adds the imageobject and imagedata elements that are needed for an image.
-
Right-click on the placeholder for the image and select Image browser.
-
In the dialog that opens, browse or search for the image in your Media library.
Note
If the dialog does not open automatically, right-click on the placeholder icon for the image and select Image browser.
Note
If the image is not in the Media library yet, you can upload it directly in this dialog by using the upload icon in the top-right.
To find out more about uploading images, see Upload Images.
-
Select the image to insert it into your topic.
Note
To use alt text in PDF outputs, it is important that you do not use tagged PDFs as images. For PDFs to use alt text, the layout has to have Generate tagged PDF enabled. The PDF processor cannot complete the publishing if your content contains tagged PDFs as images and Generate tagged PDF is enabled. You will need to use untagged PDFs as images or use different types of image files.
If you try to publish content that has a tagged PDF embedded as an image and the Generate tagged PDF enabled, you will get a "production failed" error.
-
Select Save.
"Drag and drop" is a quick way to add an image to a topic and upload it into your media library at the same time.
-
Place your cursor where you want to add an image. The position of the cursor is important, as you can only add an image where it is valid. For example, if you are inserting an image or figure, you could place the cursor after a
para
element. But if you are inserting an inline image, you would need to place the cursor inside thepara
element. -
On your computer, find the image file that you want to add to your topic and drag it onto the topic.
-
Select the blue menu at the top of the dialog to select where to upload the images.
-
Decide whether you want Paligo to compare your new images to images in the selected folder only, or images in child folders too.
-
Check the Update existing in any folder box to set Paligo to look in the selected folder and any of its descendant folders (child folders).
-
Clear the Update existing in any folder box to set Paligo to look only in the root of the selected folder.
-
-
Decide whether you want your new files to update any existing files of the same name.
-
Check the Update box to replace an existing image with your new image.
-
Clear the Update box to upload the new image in addition to the existing image.
This will mean you have multiple images with the same name. You can rename the images in the Content Manager to make them easier to manage.
Tip
You may be able to save time by selecting the Update all existing box, which automatically selects all of the update boxes at once.
-
-
Check the Remove whitespace box if you want Paligo to automatically remove any unnecessary white space (empty areas) from the edges of your image. This only applies if your image is AI. EPS, or PDF.
-
Select Upload.
Paligo uploads your image file to the media library and adds it to your topic. You can close the Upload Images dialog.
An inline image is a small picture that appears in the flow of the text, for example, an icon that appears inside a paragraph. In the following image, a save icon has been added as an inline image in a step in a procedure.
Note
There are separate sections that explain how to Add an Image, Add a Figure, and Add Side-By-Side Images.
There are several ways to add an inline image to a topic:
Tip
You can use Keyboard Shortcuts to add images, figures, inline images and side-by-side images.
"Drag and drop" is a quick way to add an image to a topic and upload it into your media library at the same time.
-
Place your cursor where you want to add an inline image, for example, inside a
para
element. -
On your computer, find the image file that you want to add to your topic and drag it onto the topic.
-
Select the blue menu at the top of the dialog to select where to upload the images.
-
Decide whether you want Paligo to compare your new images to images in the selected folder only, or images in child folders too.
-
Check the Update existing in any folder box to set Paligo to look in the selected folder and any of its descendant folders (child folders).
-
Clear the Update existing in any folder box to set Paligo to look only in the root of the selected folder.
-
-
Decide whether you want your new files to update any existing files of the same name.
-
Check the Update box to replace an existing image with your new image.
-
Clear the Update box to upload the new image in addition to the existing image.
This will mean you have multiple images with the same name. You can rename the images in the Content Manager to make them easier to manage.
Tip
You may be able to save time by selecting the Update all existing box, which automatically selects all of the update boxes at once.
-
-
Check the Remove whitespace box if you want Paligo to automatically remove any unnecessary white space (empty areas) from the edges of your image. This only applies if your image is AI. EPS, or PDF.
-
Select Upload.
Paligo uploads your image to the media library and inserts it as an inline image in your topic. You can close the Upload Images dialog.
With Side-by-side images, you can have two images next to each other on the same line, rather than stacked one above the other. To create this effect, Paligo adds the images inside a table, but you cannot see the table in the published output.
Tip
The width of the informaltable
holding the side-by-side images is by default set to 100%.
To adjust its size, select the informaltable
in the Element Structure Menu and adjust the width
in the Element Attributes Panel.
To add side-by-side images to a topic:
-
Place your cursor where you want to add an image. The position of the cursor is important, as you can only add an image where it is valid. For example, if you are inserting an image or figure, you could place the cursor after a
para
element. But if you are inserting an inline image, you would need to place the cursor inside thepara
element. -
Select the Insert menu.
-
Select Image and then Side by side images.
Tip
You can use Keyboard Shortcuts to add images, figures, inline images and side-by-side images.
-
Right-click on the placeholder for the image and select Image browser.
-
In the dialog that opens, browse or search for the image in your Media library.
Note
If the image is not in the Media library yet, you can upload it directly in this dialog by using the upload icon in the top-right.
To find out more about uploading images, see Upload Images.
-
Select the image to insert it into your topic.
-
Repeat steps 4-6 inclusive for the other image.
-
Enter a caption for the figure in the
caption
element. You can delete thecaption
element if you do not want a caption. -
Select Save.
Tip
By default, images will come out two in a row in HTML5 output. But you can easily change how these come out. For example, if you want more than two images to still appear in one row, and shrink to fit, you can do so with this in your custom CSS:
.flex-container{ display: flex; width: 100%; justify-content: space-between; flex-wrap: wrap; }.informalfigure .flex-item{ width: auto !important; margin: 0px; }.informalfigure .flex-item:last-child{ margin-right: 0px; }@media (min-width : 480px){ .informalfigure .flex-item{ width: 49% !important; } }@media (min-width : 992px){ .flex-container{ flex-wrap: nowrap; } .informalfigure .flex-item{ margin-right: 10px; } }
This would make the side-by-side images use up the entire space, and all in one row. But if viewed on smaller devices, it will change to only two in a row for medium-sized, and finally to only one, so they are stacked on top of each other, for mobile devices.
Use the align
attribute to set the alignment for images.
-
Edit a topic that contains the image. Alternatively, add an image or figure to a topic.
-
Select the image.
-
In the element structure menu, select the
imagedata
element. -
In the Element attributes section, add the
align
attribute and set its value.You can choose from:
-
Left
-
Center
-
Right
-
-
Select Save.
For example, with the following image, we have given its imagedata
element the align
attribute. The value of the attribute is set to center.
Paligo recommends that you add alternative texts to your media files. Aim to provide a text description as if you were explaining it to someone with a visual impairment. This text becomes visible when the media cannot be shown due to a slow connection or if a screen reader is used.
Alternative text (alt text) is used as a fallback for an image if the image cannot be displayed, or for improved accessibility for both videos and images. By using alt texts you improve search engine optimization (SEO) and the accessibility for people with certain disabilities. The alternative text can be read out by some screen readers. To use alt text in PDF output, see Activate Alternative Text for PDF.
Alt texts can be added in two ways for images, either:
-
Add an Image Description - It will be shown everywhere the image is used. The description is always in the default language and cannot be translated.
-
Add the Alt Element - It will override the image description for a specific topic. The
alt
element can be translated.
Tip
You can use the Image Title Attribute setting to add a title to an image in your HTML5 output, see Hover Text using the Image Title.
Enter a description that will be shown everywhere the image is used and will serve as an alt text. The image description is always in the default language and is not translated.
Aim to provide a text description as if you were explaining it to someone with a visual impairment. Try to include a keyword or synonym for your page. Do not use images for "keyword stuffing".
Note
If an image does not have a description or an alt
element, the image title
is used instead. By default, the title property is set to the image file name
To add a description that will serve as the image alt text:
-
Add the image to the topic.
-
Right-click the image and select Edit properties.
Alternatively, find the image in the Media section of the Content Manager, select its dotted menu ( ... ) and choose Edit Image.
-
Enter a Description that will serve as the image alternative text. It will be used wherever that image appears. However, if the image has an alt element in a topic, that will override the description. If it is a figure, the textual content of the figure title element will override the description as well if no alt element content is present.
-
Select Update description to save the text.
You can use the alt
element for both images and videos. The alt
element can be translated and it only applies where you have added it. This approach is useful when you reuse an image or video in many topics, but you want the description to be different, depending on the context of the topic. If you want to switch image for different languages, add the alt
element to override the image description for affected topics.
Aim to provide a text description as if you were explaining it to someone with a visual impairment. Try to include a keyword or synonym for your page. Do not use images for "keyword stuffing".
Note
If an image does not have a description or an alt
element, the image title
is used instead. By default, the title property is set to the image file name.
-
Add the image or video to the topic and then select it.
-
Select the
mediaobject
element in the Element Structure Menu and choose Go to element. -
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Enter
alt
and select it from the menu.Paligo adds an
alt
element above the image or video (but inside themediaobject
element). -
Enter the description in the
alt
element. -
Select Save.
Your images in PDF outputs can use alternative text that appear as a "hover pop-up" when you position the cursor over an image. For accessibility, the alt text can also be detected by the "Read Out Loud" feature in Adobe Reader.
To use alt text in PDF output:
-
Add the alt text to the images, see Add an Image Description or Add the Alt Element.
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select General > Misc in the sidebar.
-
Set Generate tagged PDF to Enabled.
-
Select Save.
When you publish using this layout, the PDF will be tagged and will include the alt text you have set for your images.
Important
To be able to use alt text in PDF output, it is important to know that:
-
The PDF processor cannot complete the publishing if your content contains tagged PDFs embedded as images when Generate tagged PDF is enabled. This will result in a "production failed" error. You have to use untagged PDFs as images or use different types of image files.
-
The layout must have Generate tagged PDF enabled.
For HTML outputs, you can use CSS to add borders around images and sections that contain images. For example, you could add a pink dotted line around your images, like this:
To create the pink dotted line border, we used this CSS:
.mediaobject img { border: 3px dotted #FF1493; padding:1em; }
Our sample CSS styling works like this:
-
The .mediaobject img defines the class we are going to style. There are different classes for the different image types, as explained in Borders on All Images (HTML).
-
border: defines the start of the border styling.
-
3px is the width of the border line
-
dotted is the style of the border line
-
#FF1493 is the color
-
padding: defines the start of the padding styling. The padding is the space between the image and the border.
When you style your own borders, you can use similar CSS. There are other border styles you could apply too, and if you want to find out more, we recommend the w3schools website as a resource.
Note
For information on setting image borders for PDF outputs, see Borders for Images (PDF).
You can use CSS to add borders around all images, based on the image type. For example, you could add borders around all block images, but leave inline images to have no borders.
With images that are inside figures and informalfigures, you also have the option to add a border around the entire figure/informalfigure section. So you could have a border around the section, but not the image. Or you could have different borders around both.
To use CSS to style image borders for HTML ouputs, follow the steps below. Note that for the examples provided, we have used a pink dotted border that is 3px wide. There is 1em padding (internal margin) on each image too. You can change the sizing, style, and padding as required.
Tip
For information on using CSS for border styles, we recommend the w3schools website.
-
Use a code or text editor to create a CSS file. Give it a suitable name and save it with the
.css
extension. -
Enter the CSS for the border styles you want.
To style block images, add your border styling for the
.mediaobject img
class. For example:.mediaobject img { border: 3px dotted #FF1493; padding:1em; }
To style figure sections, add your border styling for the
.figure
class. For example:.figure { border: 3px dotted #FF1493; padding:1em; }
To style informalfigure sections, add your border styling for the
.informalfigure
class. For example:.informalfigure { border: 3px dotted #FF1493; padding:1em; }
To style inline images, add your border styling for the
.inlinemediaobject
class. For example:.inlinemediaobject { border: 3px dotted #FF1493; padding:1em; }
-
Save your CSS file.
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select CSS, JS, logos and other assets in the sidebar.
-
Select Upload in the CSS section.
-
Drag your custom CSS file from your computer's file system onto the file upload dialog.
-
Select Save.
When you publish with that layout, the CSS styles will be applied to your published output.
If you only want to apply borders to specific images, follow these steps:
-
Open a topic that contains the image and then select the image.
-
Select the
parent
element for the content that you want to style in the Element Structure Menu.-
For a block image, the element is
mediaobject
-
For an inline image, the element is
inlinemediaobject
-
For a figure, the element is
figure
-
For an informal figure, the element is
informalfigure
-
-
Select Go to element.
-
Add the
role
attribute in the Element Attributes Panel and give the attribute a name as value.We recommend that you use a name that is easy to recognize, for example,
specialborder
. -
Select Save.
-
Use a code or text editor to create a CSS file. Give it a suitable name and save it with the
.css
extension.If you already use a custom CSS for your layout, you should edit that CSS file instead.
-
To add borders that will only be used by images that have the defined role, add this code to your CSS:
.specialborder img { border: 3px dotted #FF1493; padding:1em; }
Where:
specialborder
is the name of the value you gave to the role attribute in step 4.Note
You can change the border style and color to meet your own requirements. The values used here are just examples.
-
Save your CSS and Upload Customized CSS.
When you publish with that layout, the CSS styles will be applied to your published output.
You may find that you want most of your images to have borders, but there are some exceptions and these need to have no borders. Rather then set up every image border independently, you can apply borders to all images and then set your "exception" images to use different styling.
-
Set the border styles that you want to apply to those images that are to have borders. For this, follow the instructions in Borders on All Images (HTML).
-
Open a topic that contains one of the images that are to have no borders.
-
Select the
mediaobject
element for the image. -
Add the
role
attribute In theElement Attributes Panel and set its value tonoborder
. -
Select Save.
-
Use a code or text editor to create a CSS file. Give it a suitable name and save it with the
.css
extension.If you already use a custom CSS for your layout, you should edit that CSS file instead.
-
To disable borders on those images with the role you created in step 4, add this code to your CSS:
.mediaobject.noborder img { border: none; }
-
Save your CSS file and Upload Customized CSS.
When you publish with that layout, the CSS styles will be applied to your published output.
For PDF outputs, you can add borders around images. For example, you could add a pink dotted line around your images, like this:
It's also possible to add borders around the space that contains the image on a page.
When setting the image borders for PDFs, you can use the:
-
PDF layout to set the default image borders that will apply to all images, inline images, figures, and informal figures.
-
role
attribute to define specific image border styles that will only apply to one specific image.
Note
For information on adding borders for HMTL outputs, see Borders for Images (HTML).
The PDF layout editor has settings for adding borders around your block images. These settings are the borders that will apply to all block images by default.
To set a border that will apply to all block images in your PDF layout:
-
Make sure that all of the images you want to style have a
width
attribute and a value for the width. This has to be set on theimagedata
element, see Adjust Image Size. -
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select General > Images.
-
Set the Default border for images.
This setting adds a border around block images (images that are on a new line). When you set the default border, include the size, the style, and the color. The syntax for this is:
size, style, color
. For example: 0.5pt dotted #FF1493The styles you can use are none, hidden, dotted, dashed, solid, double, groove, ridge, inset and onset.
-
Set the Default border radius for images.
This setting gives borders rounded corners.
When setting a rounded corner, it is important to consider the style of the border too. To get rounded corners, you can use padding to get it as a frame. Alternatively, you can "cut" the corners of the image, and to do this, you will need to experiment with setting the border color to match the background color of the page, for example, white. Usually, a ratio of 3 provides a good result, for example, border = 3pt solid white and border radius = 9pt.
-
Use Default padding for images to set the amount of space between the image and the border (the "inner" margin).
-
Select Save.
When you publish to PDF using this layout, your block images will have a border that matches the styles you have set.
If you have a figure
or informalfigure
in your content, you can apply borders to the figure
/ informalfigure
element. These settings do not affect the border around the actual image, they only affect the border of the figure / informalfigure "container".
To define the default border settings that will apply to all figures / informal figures for PDF output:
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Formal elements > Figure.
-
Use the border settings to define the styles for the border. There are settings for width, border line style, border color, background color, and padding (internal margin).
These settings will apply to any
formal
elements in your content. -
Select Formal elements > Informalfigure.
-
Use the border settings to style the informalfigure border.
These settings work in the same way as the formal figure options in step 3, except that they apply to the
informalfigure
element instead of thefigure
element. -
Select Save.
When you publish to PDF using this layout, your figure
and informalfigure
"containers" have a border that matches the styles you have set.
You can set borders that will apply to all of your inline images by default. For this type of border, your inline images need to be inside a guiicon
element, which you can add from the element context menu.
To define the default border settings that will apply to all inline images for PDF output:
-
Make sure the inline images are inside a
guiicon
element. Theinlinemediaobject
element has to be inside a guiicon element.Use the element context menu to add the guiicon element. You can select Insert > Image > Inline image to add the
inlinemediaobject
. -
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Inline elements > guiicon.
-
Use the border settings to style the width, line style, color, background color, and padding (internal margin).
-
Select Save.
When you publish to PDF using this layout, your inline images will have a border that matches the styles you have set.
You can set borders on individual images and these borders will override any borders that are set in the PDF layout. For example, if your PDF layout sets all images to have a black dashed border, you could set one image to have a dotted red border. That image's own settings (dotted red border) take priority over the border settings in the layout.
To set the borders on a specific image:
-
Open a topic that contains the image you want to have borders.
-
Select the image
-
Select the
imagedata
element in the Element Structure Menu and choose Go to element. -
Make sure that your image has a
width
attribute and a value. This has to be set on theimagedata
element.To add a
width
attribute, select the image and then select itsimagedata
element in the Element Structure Menu. Select Go to element, and then in the Element attributes section, add thewidth
attribute and value. -
Use the Add attribute field to give the
imagedata
element therole
attribute. -
For the
role
attribute value, enter the border settings, for example:border: 0.25pt solid silver; border-radius: 3pt; padding: 15pt;
The syntax here is similar to that used for CSS and HTML, but only border, border-radius, and padding properties are supported.
Use semi-colons to separate the settings. The example above shows a border that is 0.25pt wide, solid line, and silver. It has a border radius of 3pt (rounded corners) and interior spacing (padding) of 15pt.
-
Select Save.
When you publish to PDF, the image will have the border settings that you applied specifically to that image, rather than those defined in the PDF layout.
A caption is included by default if you add a figure or side by side images, but not if you add an image. You can add the caption manually by using the caption
element.
In the image below, you see a figure where both the title and caption is used.
Important
The validation will fail if the caption is positioned above the image. To move a misplaced caption, select it in the Element Structure Menu and choose Move down.
A caption is included by default if you add a figure or side by side images, but not if you add an image.
To manually add a caption to an image:
-
Position the cursor on the right side of the image.
-
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Select Caption from the menu.
-
Enter a text inside the
caption
element. -
Select Save.
If you have added a figure, side by side images or manually added a caption that you need to remove:
-
Select the image that has the caption.
-
Select the
caption
element in the Element Structure Menu. -
Select Delete.
-
Select Save.
You can view information about an image by displaying its properties on the Image Details dialog. The details you see there are the settings for the source image, but you can see previews of variant images for different languages too.
To display the Image Details dialog:
-
To display image details, either:
-
Find the Source Language image in the Media library, select its dotted menu (...) and choose Edit Image.
-
Right-click the source language image inside a topic and select Edit Properties.
-
-
Use the Image details dialog to:
-
View information about the image, such as its filename and dimensions
-
Preview the image
-
Change its title
-
Find out which folder contains the image in the Media library
-
See applied taxonomy tags it has (if any)
-
Find out where the image is reused
-
Add alternative versions of the image for different languages, see Translate Images.
-
Add alt text (image description)
-
Note
To set the width of an image, use the image attributes (see Image Sizing).
Using sidebars combined with images, you can get columns that adjust around an image for your PDF output.
This instruction shows how to achieve a three column page where the text adjust around the image for your PDF output. By inserting a sidebar followed by an image and two more sidebars, you get an image next to a column with the following columns positioned below the image.
Tip
You can use sidebar borders when designing the page. After that you can remove the border setting from the role attribute.
-
Select the topic or component in the Content Manager to open it in the Editor.
-
Place the cursor where the
sidebar
element is to be inserted in the topic. -
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Enter
sidebar
and select it from the menu. -
Add a
title
(optional), apara
and amediaobject
by using the Element Context Menu. -
Select the
sidebar
in the Element Structure Menu below the toolbar. -
Select Go to element.
-
Add the
role
attribute to the sidebar element. -
Enter the value
float: start; width: 2in; padding: 2pt; border: thin solid black
.This gives a thin black border with 2 pt space between the sidebar border and text. The border is optional, but the spacing will be used even if the border is removed. Depending on the image size, you might have to adjust the width for both the sidebar and the image. If the image is large, try with 25% or 50%.
If you replace the value:
-
Solid
withDotted
to get a dotted border. -
Thin
withThick
to get a thick border. -
2pt
with6pt
to get more space (padding) between the text and the border. The spacing will be used even if the border is removed. -
Black
withPurple
to get a purple border. You can replace it with any color.
-
-
Fill the sidebar with text.
-
Insert an image below the sidebar.
-
Insert two more sidebars, with the same role as above, after each other and fill them with text.
-
To make the last sidebar end the page, change the value
float: start
tofloat: end
-
Select Save.
Note
You have to publish or preview the topic to be able to see the result.
This instruction shows how to achieve a one column page where the text adjust around the image for your PDF output. By inserting a sidebar followed by an image and a para, you get an image next to a column with the text in the para positioned below the image.
Tip
This can also be done by using a two column sidebar, see Level Text and Image .
-
Select the topic or component in the Content Manager to open it in the Editor.
-
Place the cursor where the
sidebar
element is to be inserted in the topic. -
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Enter
sidebar
and select it from the menu. -
Add a
title
(optional), apara
and amediaobject
by using the Element Context Menu. -
Select the
sidebar
in the Element Structure Menu below the toolbar. -
Select Go to element.
-
Add the
role
attribute to the sidebar element. -
Enter the value
float: end; width: 250pt; padding: 2pt; border: thin solid black
.This gives a thin black border with 2 pt space between the sidebar border and text. The border is optional, but the spacing will be used even if the border is removed. Depending on the image size, you might have to adjust the width for both the sidebar and the image. If the image is large, try with 25% or 50%.
If you replace the value:
-
Solid
withDotted
to get a dotted border. -
Thin
withThick
to get a thick border. -
2pt
with6pt
to get more space (padding) between the text and the border. -
Black
withPurple
to get a purple border. You can replace it with any color.
-
-
Fill the sidebar with text.
-
Insert an image below the sidebar.
Tip
Add the element attribute:
-
align
to adjust the positioning of the image. -
width
to set the image size.
-
-
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Enter
para
and select it from the menu. -
Fill the para with text.
-
Select Save.
Note
You have to publish or preview the topic to be able to see the result.
You can use the Image Title Attribute setting to add a title to an image in your HTML5 output. The title is shown as text in a tooltip when you position the cursor over the image.
-
Right-click the image and select Edit properties.
-
Select the edit icon for the Title field.
-
Enter the text that you want to use as the title and confirm the change with the checkmark.
-
Close the dialogue.
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Images in the sidebar.
-
Set Image title attribute to Enable.
If you set Image title attribute to Disable, the hover tooltip will not appear on the image in the published HTML5 output.
-
Select Save.
When you publish to HTML5 using this layout, the image in your output will have a tooltip that shows the title text.
There are several image attributes that you can use to control the size of images in your Paligo topics. You can add the attributes to the imagedata
element, and the following sections explain how to set the size values and what results to expect.
Note
What would commonly be called the "height" of an image is called depth as an attribute in Paligo. This is a legacy from DocBook, which Paligo uses as the foundation for the Paligo content model.
For vector images, such as SVG, you should only use contentwidth
and contentdepth
. These can also be used for certain other use cases, such as if you want spacing around an image, see Examples of Image Sizing.
In most cases, it is better to use the width
and depth
attributes as they are easier to predict. The contentwidth
and contentdepth
can produce unexpected (but accurate) results with bitmap images. This is because it is not always possible to determine the intrinsic image size of a bitmap image when processing the output.
Define the image size by using one of the following attributes to the imagedata
element:
-
width
- sets the width value in relation to the viewport. -
depth
- sets the depth (height) value in relation to the viewport. -
contentwidth
- sets the width value of the image and has no effect on the viewport. -
contentdepth
- sets the depth (height) value of the image and has no effect on the viewport. -
scalefit
- allows an image to be scaled up or down to fit within available space. Ifscalefit="1"
the image is scaled (with the same factor in both dimensions) so that the graphic will just fit within the available height or width (whichever is more constraining). If any other image size attribute is specified, those attributes determine the graphic size andscalefit
will be ignored.
The viewport is the available space for the imageobject
on the page. Depending on which element that is used on the imagedata
element the result will differ. If you set the image:
-
width
to 50% - the image will be sized so that it takes up half of the available space on the page. -
contentwidth
to 50% - the image will be reduced to 50% of its original size.
Use the Image Size setting to control the resolution of the images in your published HTML5 output. For example, you may want to reduce the resolution so that the image file size is smaller and so the page will load more quickly. The Image Size setting is available when you edit an HTML5 layout.
There are several image attributes that you can use to control the size of images, see Image Sizing.
Note
The Image Size setting affects the resolution (image quality and file size) of the image. It does not change the physical size of the image on the page. For that, you can use the width
and contentwidth
attributes, which can be set on the mediaobject
element of an image.
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Images in the sidebar.
-
Scroll down to Image size.
-
Select Save.
When you About Publishing the content, the images will be sized based on added attributes and values. You can Preview a Topic to see what the sizing will look like in your different outputs.
Typically, you should only set the width
or contentwidth
of an image. The depth
or contentdepth
(height) will automatically be calculated, to keep the image dimensions as the original image file. If you set both width and depth the smallest value of the two is used, and the image is scaled according to that.
There are several other attributes to control width and height. If you want to learn more about the possibilities, see DocBook image sizing reference.
For HTML5 output, you can combine the features Thumbnail Images and Lightbox for Images to get small image versions that are enlarged when selected.
Tip
To keep the SVG functionality in HTML and HTML5:
-
Add the
format
attribute in Element Attributes Panel and select svg in the dropdown menu. -
Use
contentwidth
andcontentdepth
instead of width and depth.
To set the image sizing attributes:
-
Select the topic or component in the Content Manager to open it in the Editor.
-
Select the image that you want to size.
-
Select the
imagedata
in Element Structure Menu and choose Go to element. -
Add the
width
orcontentwidth
attribute in the Element Attributes Panel. -
Set its value to the desired width in combination with any of the Measurement Units for Image Sizing.
-
Select Save.
By default, Paligo uses a nominal width and height when precalculating the percentage scaling of images. This might cause layout shifts for HTML5 Help Center outputs and result in Search Engine Optimization (SEO) issues.
If you enable the Image size attribute for your HTML5 output, Paligo will instead use the actual width and height when precalculating the percentage scaling of images. This makes the webpage load faster and provides a smoother user experience, as it allows the browser to precalculate the page layout more accurately.
To improve Search Engine Optimization (SEO) and the user experience, this setting can be used in combination with the Image size setting to boost site visibility, see Adjust Image Resolution.
Caution
Before you enable Image size attribute, you have to investigate if you have used contentwidth
and / or contentdepth
when scaling images, see Search for Attributes.
If you have, it is important to consider whether to:
-
Update the scaling for all images after enabling this setting.
-
Replace the above-mentioned attributes with the
width
attribute before enabling this setting.
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Images in the sidebar.
-
Scroll down to Image size attribute.
-
Select Enable from the menu.
-
Select Save.
Here are some examples of different image sizing combinations, designed to show you the different effects the sizing attributes can have:
In your HTML5 output, you can show diminished images that are enlarged when selected. The enlarged version of the image is shown in a "lightbox", which is a separate display that overlays your content.
This is especially useful when you have large images that would provide a better experience for users if they were smaller. This is achieved if you resize the images by using the width
attribute or enabling Thumbnail Images and then enable the Lightbox feature.
|
|
To use Lightbox for Images you have to activate the feature in the Layout Editor. Lightbox can be used on Thumbnail Images as well as images resized with the width
attribute. Click the image below to test this feature.
To enable or disable the Lightbox feature for all of the images in your HTML5 output:
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Images in the sidebar.
-
Set the Use lightbox for images to:
-
Enable if you want all block images to use the Lightbox feature.
-
Disable to turn off the Lightbox feature.
Note
If you enable the lightbox feature, you can either set all block images to use thumbnails or you can set thumbnails individually. To find out more, see Thumbnail Images.
-
-
Select Save.
Tip
The lightbox feature is also available for Zendesk outputs, but it is set up differently.
For Zendesk, Paligo has asset files that are included in the zip file that is downloaded in your browser when you publish. You can upload those asset files to the Assets section in Zendesk guide, and then add the following code to the Document head section:
<link href="{{asset 'lightbox.min.css'}}" rel="stylesheet" type="text/css" /> <script src="{{asset 'lightbox.min.js'}}"></script> <script src="{{asset 'paligo-zd-lightbox.js'}}"></script>
You only need to do this once, the first time you publish to Zendesk, see Customize Zendesk Articles Using Javascript.
When you set the value for a width
, depth
, contentwidth
, or contentdepth
attribute, you can use any of these units:
- px
-
Pixels are the default unit if none is specified.
- pt
-
Points equals 1/72 of an inch.
- cm
-
Centimeters
- mm
-
Millimeters
- pc
-
Picas equals 1/6 of an inch.
- in
-
Inches
- em
-
Ems (the font size of the current surrounding element)
- %
-
Percentage of the available page area for
width
anddepth
OR original image size forcontentwidth
andcontentdepth
.
You may have content that needs to have large images, but these images take up too much space on the page and make it more difficult to read the text. One way to handle this for HTML5 outputs is to use "thumbnails". This is where large images are shown at a much smaller size on the page. If you use Lightbox for Images, readers can click on the thumbnail image to display a larger version.
In Paligo, you can Set All Images as Thumbnails from the HTML5 layout or you can Set Thumbnails for Individual Images.
|
|
Note
By default the thumbnail will get a rounded border and a max width and height of 200 pixels (px). This can be customized in your CSS.
Tip
If you are publishing to other outputs, such as PDF, you may need to have a specific width on the image too. For this, use the contentwidth
attribute instead of width
, otherwise the thumbnail feature may not work as intended.
If you want all block images to appear as thumbnails in your HTML5 output, use the Use thumbnails for all mediaobject (block) images setting. This is in the HTML5 layout. This can be useful when you have large images that take up too much space on the page. By setting them as "thumbnail" images, they will appear much smaller. You should also enable the lightbox feature so that end users can select the images to display a larger version.
When you enable the setting and publish, the images will appear as smaller "thumbnail" images. We recommend that you also enable Lightbox for Images so that your readers can select the "thumbnail" images to display a larger version.
Tip
If you only want certain images to appear as thumbnails, see Set Thumbnails for Individual Images.
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Images in the sidebar.
-
Set the Use thumbnails for all mediaobject (block) images to:
-
Enable if you want all block images to appear as thumbnails.
-
Disable if you do not want all block images to be thumbnails.
-
-
Select Save.
You can set individual images to be shown as a thumbnail image instead of at full size. This is useful if you only want to use the thumbnail feature for certain images, such as images that are especially large.
Tip
If you want most, but not all, images to use thumbnails it may be quicker to Set All Images as Thumbnails and exclude some images from using thumbnails by adding a role
attribute to the mediaobject
element and with the value set to img-thumbnail-reset.
To use the thumbnail feature for individual images:
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Images in the sidebar.
-
Set Use thumbnails for all mediaobject (block) images to default or Disable.
-
Enable Use Lightbox for images to allow users to click on your thumbnail image to display it at a larger size.
-
Select Save.
-
Select the topic or component in the Content Manager to open it in the Editor.
-
Select the image in the content.
-
Either:
-
Select Insert.
-
Select Image.
-
Select Make thumbnail.
Paligo will resize your image in the editor, although it may not be shown as a thumbnail. When you publish, it will be shown as a thumbnail image in the output.
or:
-
Select the image's
mediaobject
element in Element Structure Menu and choose Go to element. -
Add the
role
attribute Element Attributes Panel and set its value toimg-thumbnail
.
-
-
Select Save.
When you publish your content, Paligo will display the image as a thumbnail. Your users can select the thumbnail to view a larger version (as long as you have enabled the lightbox feature on your Layout, see step 5).
The element Sidebar
has been specialized in Paligo to serve both as a separate component (called floating sidebar) and as a general-purpose reuse wrapper element, see Create an Informal Topic. Find out more about Supported Elements.
If you divide a sidebar in two columns, it is possible to level text and image for your PDF output. This can be used for step by step instruction, where the numbered steps needs to include an image.
The default setting for a sidebar
is one column with gray background, black frame and the text above the image.
By adding a role attribute that divides the sidebar in two columns, the image and text inside it, will be leveled with one another for PDF output. The role attribute will remove the frame, background color and divide the sidebar in two equally sized columns. There is no option to individually adjust the column width. Therefore it is necessary to adapt the text amount with the image size. If the text amount exceeds the image height, it will flow over to the image column. You need to add one sidebar for each text and image pair.
Note
To make this work in HTML output, you have to assign the sidebar a role, like "sidebar-css" and target that role with your CSS. Make sure to enable the role attribute as "class name" in the layout for the HTML / HTML5 configuration. Learn more about Role Attribute Values.
This example code will give the text 75 % of the sidebar width.
.sidebar-css { padding: 6pt; width: 75%; display: flex; }
The instruction below shows how to level text and image for PDF output.
-
Select the topic or component in the Content Manager to open it in the Editor.
-
Place the cursor where the
sidebar
element is to be inserted in the topic. -
Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.
-
Enter
sidebar
and select it from the menu. -
Add a
title
(optional), apara
and amediaobject
by using the Element Context Menu. -
Select the
sidebar
in the Element Structure Menu below the toolbar. -
Select Go to element.
-
Add the attribute
role
to the sidebar element. -
Enter the value column-count: 2; column-gap: 10pt.
This results in two columns with 10 pt space between them.
-
Select Save.
To level text and image in a step by step instruction, you can use sidebars with ordered lists for your PDF output.
Let each step be represented by a new sidebar, because if you have several steps in the same sidebar, you will only be able to level one image.
-
Add a Two Column Sidebar for each step.
-
Select the
para
inside the first sidebar. -
Select Ordered list in the toolbar.
-
Repeat for all sidebars in the step by step instruction.
-
Select the
orderedlist
in the Element Structure Menu for the sidebars representing step 2 and forward. -
Add the element attribute
Continuation
. -
Set the value to
Continues
.This results in sidebars with a continued numbering.
-
Select Save.
Note
You have to publish the topic to be able to see the correct numbering.
When you update your documentation, you will most likely need to replace some of your images from time to time.
Content reuse applies to images as well as text in Paligo. So if you replace an image in the media library, you only update once, in one place, and the change will apply wherever that image is used. This can save you a lot of time and effort.
In this section, we explain how to replace your Source Language images in the media library. These are the images that you add and use in the content. However, if you translate your content into different languages, you may need "language variant images", see Translate Images.
Tip
If you just want to change the image in one topic without replacing an image in the media library:
-
Double-click the image to open the media library.
-
Select another image or upload a new image, see Upload Images.
If you replace an image in the Paligo media library by uploading a new image, every topic using that image will be updated.
To upload a replacement image to the media library:
-
To display image details, either:
-
Find the Source Language image in the Media library, select its dotted menu (...) and choose Edit Image.
-
Right-click the source language image inside a topic and select Edit Properties.
-
-
Select Upload Image (in the lower right corner) to replace the current image with a new one.
-
Select Select file to add the replacement image.
-
Select Upload.
-
Close the dialog when the upload is complete.
Every topic that used the previous image will now use the new one instead.
If you replace an image with one already in the Paligo media library, every topic using the original image will be updated.
To use an existing image as replacement image:
-
To display image details, either:
-
Find the Source Language image in the Media library, select its dotted menu (...) and choose Edit Image.
-
Right-click the source language image inside a topic and select Edit Properties.
-
-
Select Replace with existing (in the lower left corner) to replace the current image.
-
Select the alternative image that you want to use.
Tip
If the replacement image is not in the media library, you can upload it, see Upload Images.
-
Close the dialog when the upload is complete.
All topics that used the original image are now updated. They will use the alternate image that you selected instead of the original image.
Paligo has a media library that contains all of the images you upload. When you upload images to the media library:
-
Paligo compares the image filename to the images that already exist in the media library. If there are images with matching filenames, you can choose to update them or add the new images and the existing ones.
-
Paligo manages the image formats and translated images automatically. We call this Smart Image Management.
Paligo takes care of the complexity of managing different versions of images for you:
-
Automatic image formats: You can upload an image in just one format, for example, the highest resolution version, or a source file in Photoshop (PSD), or Illustrator (AI). Paligo will automatically handle the conversion to a suitable output format for print or web, so you do not have to keep track of multiple format versions of the same image.
-
Images in multiple languages: You can also upload the same image translated into multiple languages (such as screenshots for localized software). Paligo will automatically select the right language version when you publish to different languages. Read more about that in Translate Images.
Tip
If you need to add lots of variant images for outputs in different languages, see Batch Import of Language Variant Images.
You can add images to the library directly from the Content Manager. The images that you add are then available to select when you add a figure, image, inline image, or side-by-side images.
-
Expand the Media section in the Content Manager.
-
Select the dotted menu ( ... ) for a folder or create a new folder and select the options menu for that.
-
Select Upload Images.
-
Decide whether you want Paligo to compare your new images to images in the selected folder only, or images in child folders too.
-
Check the Update existing in any folder box to set Paligo to look in the selected folder and any of its descendant folders (child folders).
-
Clear the Update existing in any folder box to set Paligo to look only in the root of the selected folder.
-
-
Drag and drop your image files from your computer into the box.
Alternatively, select Add Files and browse to the files you want to upload.
Note
If you are uploading files that have a hyphen and language code suffix, such as battery-fr.jpg, Paligo will look for Source Language versions of the same image. If it finds a match, you get the option to update the language variant, for example, Update (fr) for a French variant. For more details, see Translate Images.
-
Decide whether you want your new files to update any existing files of the same name.
-
Check the Update box to replace an existing image with your new image.
-
Clear the Update box to upload the new image in addition to the existing image.
Meaning if you have multiple images with the same name. You can rename the images in the Content Manager to make them easier to manage.
Tip
You may be able to save time by selecting the Update all existing box, which automatically selects all of the update boxes at once.
-
-
Check the Remove whitespace box if you want Paligo to automatically remove any unnecessary white space (empty areas) from the edges of your image. This only applies if your image is AI. EPS, or PDF.
-
Use the Open parent folder box to choose whether Paligo will show you the folder that contains the images when they have finished uploading.
-
Select Upload.
Paligo uploads your image files to the media library. If you have updated any of the image files, the topics that use those images are automatically updated with the new images.
When you are editing a topic, you can insert a figure, image, inline image, or side-by-side images. When you do this, you can choose one of the existing images from the library or you can upload a new image to the library and insert that.
Note
It is also possible to upload an image to a topic by using the image details dialog. But that approach does not include checking the filenames against existing images in the library or language variants.
To add images to the library from a topic:
-
Select an image in a topic to display a browse dialog.
-
Select Upload Images.
-
Select the blue menu at the top of the dialog to select where to upload the images.
-
Decide whether you want Paligo to compare your new images to images in the selected folder only, or images in child folders too.
-
Check the Update existing in any folder box to set Paligo to look in the selected folder and any of its descendant folders (child folders).
-
Clear the Update existing in any folder box to set Paligo to look only in the root of the selected folder.
-
-
Drag and drop your image files from your computer into the box.
Alternatively, select Add Files
Note
If you are uploading files that have a hyphen and language code suffix, such as battery-fr.jpg, Paligo will look for source language versions of the same image. If it finds a match, you get the option to update the language variant, for example, Update (fr) for a French variant. For more details, see Translate Images.
-
Decide whether you want your new files to update any existing files of the same name.
-
Check the Update box to replace an existing image with your new image.
-
Clear the Update box to upload the new image in addition to the existing image.
Meaning if you have multiple images with the same name. You can rename the images in the Content Manager to make them easier to manage.
Tip
You may be able to save time by selecting the Update all existing box, which automatically selects all of the update boxes at once.
-
-
Check the Remove whitespace box if you want Paligo to automatically remove any unnecessary white space (empty areas) from the edges of your image. This only applies if your image is AI. EPS, or PDF.
-
Use the Open parent folder box to choose whether Paligo will show you the folder that contains the images when they have finished uploading.
-
Select Upload.
Paligo uploads your image files to the media library. If you have updated any of the image files, the topics that use those images are automatically updated with the new images.
You can download an image from Paligo so that it can be used elsewhere. This feature is especially useful if you have lost the original image file that you uploaded to Paligo. For example, let's say you have a screenshot that you upload to Paligo. You later later realise it contains sensitive information, but you have lost the original file. Rather than take an entirely new screenshot, you can download the image from Paligo, block out the sensitive information, and then upload it again.
To download an image from Paligo:
-
-
On the Image Details dialog, select the link in the Filename entry.
The browser shows the image at maximum size in a new tab.
-
Right-click on the image and use the browser's features to save the image to your computer. The options for saving the image can vary, depending on which browser you use. Here, we are showing the options in Google Chrome.
When you publish HTML content in Paligo, any images in the output are given a file name. The file name can be either:
-
A unique ID that is based on the UUID of the image. This file name remains the same every time you publish and is known as a "persistent" file name.
-
A unique ID that is automatically generated by Paligo each time you publish. This file name will be different each time you publish.
In most cases, the "persistent" file name is preferable, especially if you use GitHub or similar for version control. For example, let's say that you have a publication with 200 topics and they all contain images. You publish the publication several times, without changing the content at all. Each time you publish, it is going to appear that all 200 topics and all the images have changed, because all of the images have had new file names generated. But if you had "persistent" file names, there would be no updates, which is correct.
However, if you have a particular need for the image file names to change each time you publish, you can disable "persistent" file names.
To enable or disable "persistent" file names, use the Display System Settings.
Note
The reason that we use IDs for file names is that the IDs are unique and are supported for translations, imports, exports, etc. If we only used regular text file names, there could be problems with special characters not being recognized by other systems, or multiple files all having the same file name.
If you publish HTML outputs, you may want to style your images, for example, you could add a border around all of your images.
To style images in HTML, use CSS to create the styling, upload the CSS file to your HTML layout, and then republish.
For the CSS, you will need the image class names. There are default class names, which you can use to style all images at once, or you can add your own custom class names. With your own custom class names, you can style an individual image or multiple images of your choice.
Note
It is beyond the scope of the Paligo documentation to cover all of the possibilities for styling images with CSS. There are many online resources for learning about styling images with CSS, including www.w3schools.com.
Tip
To find out how to upload a CSS file that you have created, see Style with CSS.
All images in your published HTML content have a class name. You will need the class name to style the images with CSS.
By default, the class names are:
-
mediaobject
for block images -
inlinemediaobject
for inline images.
In the published HTML, the mediaobject
is the class name for a container <div> element, and the image is inside the <div>.
Similarly, the inlinemediaobject class name is for a span element that contains the inline image.
You can use a CSS selector to style the image inside the mediaobject and inlinemediaobject "containers". For example, to put a border around all mediaobjects, you could create a CSS file containing the following styling:
.mediaobject img { border: blue; border-style: dashed; }
You would then upload that CSS file to your CSS layout and publish using that layout. The block images in your published output would then have a blue dashed line as a border.
If you apply styling to mediaobject
or inlinemediaobject
, it will apply to all images that have that class name. So if the default settings are in place and none of your images have a custom class name, styling mediaobject
will affect all of your block images and styling inlinemediaobject
will affect all of your inline images.
If you only want to style specific images, you can give those images their own class names. There are two ways to do this: you can Custom Class Names for Images - Role Attribute or Custom Class Names for Images - Taxonomy Tag .
To style an individual image or perhaps a selection of images, you need to give the image(s) a class name. The class name has to be different to the general mediaobject
or inlinemediaobject
that is assigned to all images by default. When the class name is in place, that class can be styled separately in your CSS.
One way to give an image a class name is to use the role
attribute. You can set it on the image's mediaobject
element, and then set its value as the class name you want to use.
-
In Paligo, open the topic that contains the image you want to style once it is published.
-
Select the image and then, in the Element Structure Menu, select the
mediaobject
element. From the menu, select Go to element. -
In the Element attributes section, use the Add attribute field to add a
role
attribute. For therole
attribute's value, enter the name you want to use as the class name. Use lower case. -
Select Save.
-
Use a code/text editor to create a custom CSS stylesheet file (or edit an existing CSS file that you use for Paligo).
When Paligo publishes your content, the role is added to the "container" mediaobject <div> or <span> inlinemediaobject for the image. For example, if you have a block image and add a role with the value diagram-large, this will appear like this in the HTML:
<div class="mediaobject diagram-large"> <div class="material-placeholder"> <img src="image/1602519409130b.png" style="" alt="image2-transparent.png" class="materialboxed"> </div> </div>
If you have an inline image and add a role with the value diagram-small, it will appear in the HTML like this:
<span class="inlinemediaobject diagram-small"> <img src="image/16025194086577.jpg" alt="large-version-screenshot2.jpg"> </span>
To style the image rather than the container <div> or <span>, use a CSS selector to target the image inside the container, for example:
.mediaobject.diagram-large img { border: blue; border-style: dashed; }
or for an inline image:
.inlinemediaobject.diagram-small img { border: blue; border-style: dashed; }
-
Save your CSS file and Upload Customized CSS.
-
Publish your content using the HTML layout that contains the CSS file with the image styling.
Paligo publishes the content and the output includes your CSS. The styles in your CSS take precendence over the other CSS provided by Paligo, and the styling is applied to your images.
To style an individual image or perhaps a selection of images, you need to give the image(s) a class name. The class name has to be different to the general mediaobject
or inlinemediaobject
that is assigned to all images by default. When the class name is in place, that class can be styled separately in your CSS.
One way to add a class name for an image is to use taxonomy tags:
-
Select Layout and then edit the HTML5 layout you are going to use for publishing. Alternatively, you can create a new HTML5 layout and edit that.
-
In the Classes and Attributes settings, set Output taxonomies as class names to Enable.
-
Select Save.
-
Select the Taxonomy Manager in the Content Manager to open the structure.
-
Either:
-
Find an existing taxonomy tag and drag it on to the image in the Media section of the content manager.
-
Create Taxonomy Tags and Add Taxonomy Tags by dragging it on to the image in the Media section of the content manager.
-
-
Publish your content using the HTML layout you edited in step 2.
-
View the published output in a browser. Use the browser's inspection tool to find the image in the HTML. You should see that it has a class name that matches the taxonomy tag.
-
Use a code/text editor to create a custom CSS stylesheet file (or edit an existing CSS file that you use for Paligo).
In the CSS, style the class that has been added for the image. For example, if you added a taxonomy tag called "battery", the image in your HTML output would have these elements:
<div class="mediaobject taxonomy-product-battery"> <div class="material-placeholder"> <img src="image/1602a53b445615.jpg" style="" alt="battery.jpg" class="materialboxed"> </div> </div>
So you could style the image by using a CSS selector to select the image inside the class .taxonomy-product-battery. For example, to give the image a blue dashed border, you could use:
.mediaobject.taxonomy-product-battery img { border: blue; border-style: dashed; }
-
Save your CSS file and Upload Customized CSS.
-
Publish your content using the HTML layout that contains your custom CSS.
In the HTML output, the image should now be using the custom styling you defined in your CSS.
To set the default styling for images in PDF outputs, use the Images settings on the PDF Layout. There are settings for defining the default size, alignment, padding, and border for images.
Important
The default image styles only apply to images in a PDF if those images do not already have styling in place.
When you edit a topic, you can select the imagedata
element for each image and add:
-
A
width
orcontentwidth
attribute that sets a width value (see Image Sizing). This takes priority over the default width setting in the PDF Layout. -
An
align
attribute and value (see Align an Image). This takes priority over the default alignment setting in the PDF Layout. -
A
role
element that defines a border, border-radius, and padding in the value (see Borders on Selected Images Only (PDF). Therole
values take priority over the default border, border radius, and padding settings in the PDF Layout.
-
Select Layout in the top menu.
-
Select the PDF Layout you are going to use for publishing. Alternatively, create a new one (see Create a Layout).
-
Select the General category and then select Images.
-
Set the Default width for images. This sets the width of all images except those that have a
width
orcontentwidth
attribute and value.Either:
-
Enter an absolute value and its units of measurement, for example, 288px.
-
Leave the field blank or set its value to "none" to remove a default width value. Do not include the quotes.
We have included an example that shows how the default width may be ignored for some images in your PDF output.
-
-
Set the Default alignment for images. This alignment applies to any image that does not have an
align
attribute and value.Choose from:
-
Set the Default height for inline images. This height applies to any inline image that does not have a
width
attribute and value.Enter the value and its units of measurement, for example, 2em.
-
Set the Default border for images. This border will apply to all images unless they already have a border set in a
role
attribute.Enter the border line thickness, style, and color, for example, 5pt solid crimson.
Use these values to define the line thickness, style, and color:
-
Thickness
-
thin
-
medium
-
thick
-
Exact value (also known as "length"). Enter a width measurement including the units of measurement, for example,
3pt
.
-
-
Style
-
Color
-
Color name, such as
silver
-
RGB value, such as
rgb(192,192,192)
-
Hex number, such as
#C0C0C0
-
-
-
Set the Default border radius for images.
This setting only applies to images that do not already have a border radius set in a
role
attribute. It defines the amount of curve on the corners of the border box. Set it to 0pt for no curves or enter a value and a unit of measurement to add curves. For example, you could use 10pt to give the border curved corners. -
Set the Default padding for images. This is the amount of space between the image and the border of the image container. It applies to all images except those that already have padding set in a
role
attribute. For example, in the following image, the white space between the photo's edges and the red border is the padding.Enter a value and its units of measurement, for example, 30pt.
-
Select Save.
Example 32. Image's attribute values take priority over PDF Layout settings
Let's say you are editing a topic and you insert an image. You just insert the image and set its alt text (good practice!), but you do not set any attributes.
You continue adding content to the topic and add another image. This time, you select the image's imagedata
element and give the image these attributes:
-
width
with a value of:150px
-
align
with a value of:center
-
role
with a value of:border: 0.25pt solid silver; border-radius: 3pt; padding: 15pt;
You save the topic and then edit the PDF Layout. You open the General category and select the Images subcategory. There, you set:
-
Default width for images to:
288px
-
Default alignment for images:
Start
-
Default border for images:
5pt solid crimson
-
Default border radius for images:
10pt
-
Default padding for images:
30pt
You save the PDF Layout and then use it to publish. In the PDF output:
-
The first image uses the default settings from the PDF Layout, for example, it has a crimson border with 10pt radius.
-
The second image uses its own settings, such as center alignment and silver border. These were set in the
role
attribute for the image and they take priority over the Layout settings.
Note
Paligo only ignores the Layout settings that are already defined in the role attribute. For example, let's say the second image's role attribute value was:
border: 0.25pt solid silver; padding: 15pt;
Note that it does not include the border-radius.
This means Paligo will apply the border width, color, and padding from the image's role
attribute. It will also apply the border-radius
that is set in the Layout (as the role
attribute does not have a border-radius
specified).
Comments
0 comments
Article is closed for comments.