We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

What is the correct syntax of the Focus variable on background images?

Peter Emil van den Berg January 31, 2019 by Peter Emil van den Berg

Hi all. Really love the fact that my clients can use the crop_focal feature on their images. But when using it on background images the docs aren't clear how to use it correct. Even Ben Furfie had to write a remark but unfortunate for me I'm not getting it to work.

The image is coming through alright, but there is no value outputted on the focus_css spot.

Ideas anyone?

My markup:

<div style="background-image: url( {{ hero_image }} ); background-position: {{ focus_css }};"></div>

Resulting html: <div style="background-image: url(/assets/productions/lev/image-2018-05-18.jpg); background-position: ;"></div>

The asset involved has focal point set:

title: Main Assets
path: assets
url: /assets
        focus: 38-2
Answered by Peter Emil van den Berg!
>>>>>>> Answered <<<<<<<
1 Reply
1 Follower