Apply section background image in all languages

This is the code that works:

{% if header.background_images.top_section is not empty %}
{% set image = header.background_images.top_section|first %}
{% set image_url = url(image.path) %}
.top-bg {
     background-image: url({{ image_url }}) !important;

Currently, I have to upload the background image separately in each language…
Is there a way for the background image to be automatically applied in all languages?

You could try to load the default language page in twig and extract the data from there, instead of the page.find function you will have to use the pages.dispatch function to avoid language redirection. This means you only have to specify the background image via selection for the default page.

Another possibility consists in synchronizing some of the header data between the different language versions. This can be done via function that hooks into onAdminSave onAdminAfterSave.

A language synchronization plugin for frontmatter data is one of the missing GRAV plugins…