Image

Display image meta fields (like ACF Image fieldarrow-up-right) and Post featured images.

In Advanced Views, if you add an Image field to your Layout you'll have the option to the select Image Size. In Pro you can enable the image Lightbox and Slider option.

1. Crop images

Default crop sizes are available for selection when assigning an image field in your Layout.

circle-check

How to use it

Visit the Advanced Views tab in WordPress backend.

Click on the Edit link or Title of your Layout to edit.

Click the Add Field button.

Select Post & Post fields (WordPress, WooCommerce) from the Group dropdown.

Select Featured Image field from the list or Select Featured Image with link. Or any other group and field that is an image field type.

An extra Field appears called Image Size, select the preferred image size from the list.

Click on the Update button to save and publish your Layout.

2. SVG format support

By default, WordPress doesn't allow uploading .svg files into the Media Library. However, this can be configured using some dedicated pluginarrow-up-right.

Advanced Views supports SVG out-of-the-box. As you may have seen, an ordinary image has the following markup by default:

This doesn't work for SVG, so Advanced Views provides a separate field property for SVG cases: svg_content. When you expect an SVG to appear, you should instead use:

This field contains the content of the SVG, so it will be placed on the page as an inline SVG image.

circle-info

Why inline? Because only inline SVGs support color changes, allowing you to style it with CSS and even change the color on hover.

If you need to assign a class to the SVG element, you can use the following trick:

3. Advanced usage

If you need to wrap an image in a link, add both the Link and Image fields to the same Layout and save it. Then, copy the Default Template and modify it so that the image tag is inside the link tag, like this:

3.2) Background image

You can turn an image into the background of any element by defining the background-imagearrow-up-right property inline, like this:

After that, don't forget to add the following CSS rules to the CSS code field of your Layout:

Another approach is to use an <img> tag within the target element and position it absolutelyarrow-up-right. This method allows for more control over the image, such as adding effects or transitions.

3.3) Scale-on-click effect

Instead of using a lightbox, you can apply a "scale" effect to enlarge images on click, keeping the layout intact. This method provides an easy way to view larger images directly within blog posts or content areas.

Image tag in the template:

JS code:

CSS code:

4. Lightbox (Pro)

Lightbox shows a zoom icon on image hover and allows readers to click and open an image in full-screen mode.

Follow the guide above to assign an image field to your Layout.

From the Lightbox dropdown, select Simple for a lightbox with no settings, or select LightGallery for a richer looking lightbox, with slider and settings to control the functionality.

circle-exclamation

Publish or update your Layout.

Customize the Lightbox in the JS Code field under the CSS & JS tab.

The default instance settings:

Last updated