<p>That's not possible, but the way I handle this is to have a Global called "Missing Image Fallback" inside a "Generic" Global field set, and then when I need to reference an image I use the following twig:</p>

<pre><code>{% set image = entry.myImageField.first ?? generic.missingImageFallback.first %}
</code></pre>

<p>That will assign the first myImageField asset to 'image' if it's been filled in, but fall back to the generic global field if not.</p>

CC BY-SA 3.0
2017-10-11T12:40:07.710Z
2017-10-11T12:40:07.710Z
Matt Wilcox
<p>I have a field for upload an image in asset field. Can we set a default image in this field. Means when I create a new entry a default image has been already selected in asset field.</p>

<craft-features>
How we can set an image as default value in assets field
# How we can set an image as default value in assets field

(Asked by: username_0 on 2017-10-11)

I have a field for upload an image in asset field. Can we set a default image in this field. Means when I create a new entry a default image has been already selected in asset field.

**Tags:** craft-features


---

## 1 answers

### Answer by username_1 on 2017-10-11. Score: 6

That's not possible, but the way I handle this is to have a Global called "Missing Image Fallback" inside a "Generic" Global field set, and then when I need to reference an image I use the following twig:
{% set image = entry.myImageField.first ?? generic.missingImageFallback.first %}

That will assign the first myImageField asset to 'image' if it's been filled in, but fall back to the generic global field if not.


---

