NoMethodError in Web#web_product

Showing /var/www/vhosts/sniker.es/sniker/app/views/web/menu/_product_schema.html.erb where line #6 raised:

undefined method `image' for nil:NilClass

Extracted source (around line #6):

3
4
5
6
7
8
9
          
"@context": "https://schema.org/",
"@type": "Product",
"name": "<%= product.name %>",
"image": "https://<%= WebConfig.first.web_url %><%= product.photos.order(:position).first.image %>",
"description": "<%=product.description %>",
"brand": "<%= product.brand_name %>",
"offers": {

Trace of template inclusion: app/views/web/web_product.html.erb

Rails.root: /var/www/vhosts/sniker.es/sniker

Application Trace | Framework Trace | Full Trace
app/views/web/menu/_product_schema.html.erb:6:in `_app_views_web_menu__product_schema_html_erb__4381850934125082781_47097492612940'
app/views/web/web_product.html.erb:8:in `_app_views_web_web_product_html_erb___158667292129157436_47097494054400'

Request

Parameters:

{"id"=>"802-zapatillas-pompeii-higby-color-marron-para-hombre"}

Response

Headers:

None