Trying to set an image URL using a global asset field
I don't know if it's the cause of the error you're receiving or not, but this is incorrect Twig syntax:

{% set image = '{{ websitePreferences.placeholderImage.first.url }}' %}


You'll never need to nest {{ }} inside of {% %} or visa versa in Twig.

This is correct:

{% set image = websitePreferences.placeholderImage.first() %}