Image
Image places one picture in a column. It is in the Media category of the element list, and it is the element to reach for whenever you would otherwise use a plain image: it adds an entrance animation, a hover effect, a link or lightbox, a shadow, rounded corners, a mask, and control over how wide the picture is allowed to be.
For several images use Image Gallery or Carousel. For an image behind other content, use the column or row background rather than this element.
The image
- Image Media The picture, from the media library.
- Image Size Choice Which registered size to load. The element also outputs a
srcset, so the browser can still pick a different file from that size's set. - Custom Image Size Text Image Size set to Custom only. The name of a size registered by a plugin or your child theme.
The sizes, in the order the dropdown lists them:
- Default (Full) The file as uploaded.
- Small WordPress's
thumbnail, whose dimensions are set in Settings > Media. - Small Landscape 600 x 403, cropped.
- Medium WordPress's
medium. - Medium Large WordPress's
medium_large. - Large WordPress's
large. - Landscape 900 x 604, cropped.
- Large Square 800 x 800, cropped.
- Square 500 x 500, cropped.
- Small Square 350 x 350, cropped.
- Large Featured 1870 x 770, cropped.
- Custom A size named in the field below.
Salient's own sizes are hard crops taken from the center, so a subject at one edge of a wide photo can be cut out of a square. The four WordPress sizes follow whatever Settings > Media says.
Every Salient size except Small Landscape is a switch in Theme Options > General Settings > Image Sizes. All of them are on by default, and sites turn them off to cut down on the files each upload generates, which can also be done from a child theme. If the size an element asks for is not registered, WordPress has nothing to return and serves the full size instead, which is how a thumbnail slot ends up loading a 4000px photo.
Sizes are also generated at upload. Turning one on, or changing its dimensions, does nothing for images already in the library until you regenerate thumbnails.
Width
An image fills the width of its column and stops there. Desktop Max Width changes that: the value is a percentage of the column, so 150% makes the image half as wide again as the column it sits in, and the extra hangs outside. Which side it hangs on is Image Alignment.
100% The image is the width of its column, which is where it starts.
150%, centered The overhang is split, so the image is wider than the text on both sides.
150%, right aligned The image stays level with the column on the right and all of the overhang falls left.
- Desktop Max Width Choice How wide the image may be, against the width of its column.
- Mobile Max Width Choice Not shown when Desktop Max Width is Custom. What that overhang does below 1000px. See below.
- Custom Max Width NumberResponsive. Set a different value for desktop, tablet and phone. Desktop Max Width set to Custom only. A width of your own, with separate desktop, tablet and phone fields.
Desktop Max Width is a list of percentages, in the order the dropdown gives them:
- 100%
- 110%
- 125%
- 150%
- 165%
- 175%
- 200%
- 225%
- 250%
- 75%
- 50%
100% is the column's own width and where the element starts. Below it the image shrinks inside the column; above it the extra hangs outside. Two more values sit at the end of the list: None removes the ceiling altogether, so the image renders at its natural pixel size and overflows the column whenever the file is bigger than the space, and Custom replaces the dropdown with three fields, one per breakpoint.
The width you set holds at every screen size, but the offset that centers it, or pins it to the right, is dropped below 1000px. A centered 150% image is still 150% wide there and hangs entirely off the right of its column.
Mobile Max Width puts an offset back for that range. For a centered image the values that re-center it are 150% and 200%; for a right aligned one, 125%, 150%, 165%, 175% and 200%. If you want genuinely different widths per device rather than a repositioned overhang, use Custom instead, whose tablet and phone fields each set their own width.
Custom Max Width
Choosing Custom gives three fields, and they apply the way the rest of Salient's responsive fields do: the desktop value everywhere, the tablet value at 999px and below, the phone value at 690px and below.
Each field takes a number and a unit. %, px, rem, em, vw and vh all work, and a bare number is read as pixels. Percentage and viewport values are rounded down to a whole number, so 33.5% becomes 33%.
Two things to know about the desktop field in particular. A percentage here is a percentage of the column, the same as the dropdown's values. And a pixel value under 100 is applied as a fixed width rather than as a maximum, so 80 gives a box exactly 80px wide instead of one that is at most 80px.
Animation
The Animation tab holds three independent effects: one for when the image scrolls into view, one that runs as the page scrolls past, and one for hover.
Entrance
- Animation Type Choice Triggered on Entrance for a one time arrival, Looped Infinitely for continuous motion.
- Animation Choice Triggered on Entrance only. Which arrival to use.
- Animation Delay Number Milliseconds to wait after the image comes into view. Stagger a row of images by giving each one a larger delay than the last.
- Disable Animation on Mobile Toggle Skips the animation under 1000px, so the image is simply there.
- Animation Easing Choice The curve the movement follows. Inherit From Theme Options uses the site wide setting, which is
easeOutCubicunless it has been changed. - Looped Animation Choice Animation Type set to Looped Infinitely only. None or Rotate, which turns the image continuously.
The arrivals:
- None
- Fade In
- Fade In From Left
- Fade In From Right
- Fade In From Bottom
- Fade In From Top
- Grow In
- Slide Up
- Flip In Horizontal
- Flip In Vertical
- Reveal Rotate From Top
- Reveal Rotate From Bottom
- Reveal Rotate From Left
- Reveal Rotate From Right
An image starts its animation when its top edge reaches 88% of the way down the window, so it is already a little way onto the screen when it begins. Column/Image Animation Timing in Theme Options sets how long every one of them takes, 750ms out of the box.
Theme Options > General Settings > Page Builder Element Animations On Mobile Devices is set to Disable as it comes, so on a mobile device the image is drawn in place with no animation. Enable it if you want the motion there too; the per element Disable Animation on Mobile above then turns it back off for this image alone.
Scroll movement
A slow drift as the page scrolls past, which reads as depth when neighboring elements move at different rates.
- Movement Choice Move Y Axis or Move X Axis.
- Movement Intensity Number How far it travels, from -5 to 5. Leave it empty and there is no movement at all, which is the element's resting state. A negative value sends it the other way.
- Persist Movement On Mobile Toggle Keeps the drift on small screens, where it is off by default.
Hover
- Hover Animation Choice None, Zoom In, Zoom In Crop, or Color Overlay. Zoom In grows the picture slightly. Zoom In Crop grows it further while pulling its frame in, so the effect reads as the crop tightening. Color Overlay fades a color over it.
- Hover Overlay Color Color Color Overlay only. The color that fades in.
Spacing and alignment
- Margin NumberResponsive. Set a different value for desktop, tablet and phone. Top, bottom, left and right, with their own tablet and phone values. A bare number is pixels; add
%for a percentage. The link icon between two fields constrains them to the same value. - Image Alignment Choice Align left, Align center or Align right. It positions the image inside its column, and it also decides which way an over wide image overflows.
Link
- Link to large image? Toggle Opens the full size version of this image in the lightbox. It replaces the fields below, so use one or the other.
- Display Caption in Lightbox Toggle Link to large image only. Shows the media library caption under the enlarged image.
- Image link Text Where the image should go when clicked.
- Screen Reader Text Text What the link is announced as. Worth filling in whenever the image is a link, since a decorative image gives a screen reader nothing else to read.
- Link Target Choice Same window, New window, or Lightbox. Lightbox works for media URLs, images and videos; a link to a page cannot open in one.
Shadow and rounded edges
- Border Radius Choice 0px, 3px, 5px, 10px, 15px, 20px or Custom, which gives a field per corner.
- Box Shadow Choice None, Small, Medium, Large or Very Large Depth, or Custom. The four depths are the same shadows used across the theme, so an image matches the cards and columns beside it.
- Shadow Method Choice Custom shadow only. CSS Box Shadow casts from the image's rectangle; CSS Filter Drop Shadow casts from what is actually opaque, which is what you want for a
.pngcut out. - Custom Box Shadow Offset, blur, spread and color, for the Custom setting.
Box Shadow is not offered when the Animation is one of the four Reveal Rotate arrivals.
Advanced
- Image Loading Choice Default follows the site's lazy load setting, Lazy Load forces it on for this image, Skip Lazy Load forces it off. Turn it off for anything above the fold: a lazy loaded hero image is a slower first paint, not a faster one.
- Custom "sizes" Attribute Code Replaces the
sizeshint WordPress generates, for cases where the browser is choosing a file bigger or smaller than the slot deserves. For example(min-width: 400px) 400px, 100vw. - Display Image Title Toggle Renders the media library title as a
titleattribute, which browsers show as a tooltip on hover. - Display Image Caption Toggle Prints the media library caption under the image.
- Fit to Container Toggle Makes the image cover its parent instead of sitting at its own aspect ratio, cropping whatever does not fit. It needs a parent with a height of its own, such as a column with equal height turned on.
- Image Position Choice Fit to Container only. Which part of the image survives the crop, from Center Center to any of the eight edges and corners.
- Overflow Visibility Choice Visible or Hidden. Hidden clips anything that leaves the image's box, which is what you want when a mask or a hover zoom should stop at the edge.
- CSS Class Name Code A class of your own, to target this image from custom CSS.
Mask
The Mask tab cuts the image to a shape rather than a rectangle: a circle, an arch, a star, or a .png of your own. The shapes, the sizing and the per device alignment are the same set the Column carries, and they are covered in Mask.
Positioning
The Positioning tab takes the image out of the column's flow so it can be laid over something else, offset from an edge, or nudged with a transform. It is shared with six other elements and is covered in Positioning.