Referencing a background image from a different page

Hi I am trying to get an image URL from the home page and use it on some of the pages of my website. I am getting no errors, but also no image with this method. I have used this to get the text which works fine: <?= page('home')->packageSectionTitle() ?>

Why does this not work for images?
<div class="package-image" style="background-image:url(<?=($site = page('home')->package1IMG()->toFile()) ? $site->url() : ''; ?>" alt="<?=($site = page('home')->package1IMG())?>">

What is this? A field name?

On a side note: Don’t use $site, $page, $pages and $kirby as custom variable names as these are default global Kirby variables.

thank you, yes I replace site with pkg-img. this worked.