From 51453606f9ee06e76a5fd9ae11476873bd837b83 Mon Sep 17 00:00:00 2001 From: gitressa <3491208+gitressa@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:15:30 +0200 Subject: [PATCH 1/2] Add image in recipe.yml --- recipe.yml | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/recipe.yml b/recipe.yml index 772ee29..9f6cbe0 100644 --- a/recipe.yml +++ b/recipe.yml @@ -1,8 +1,9 @@ name: 'Drupalize.Me Blog content type' -description: 'Provides a Blog content type with Title, Body, and Tags; grants content editors permissions to create/edit blog posts.' +description: 'Provides a Blog content type with Title, Body, Image, and Tags; grants content editors permissions to create/edit blog posts.' type: 'Content type' install: + - image - node - text - taxonomy @@ -11,6 +12,8 @@ config: strict: # Treat field storages strictly, since they influence database layout. - field.storage.node.field_dme_blog_tags + - field.storage.node.field_dme_blog_image + - field.storage.node.body actions: # Ensure the role exists, then grant the needed permissions. @@ -42,6 +45,15 @@ config: type: text_textarea_with_summary weight: 1 region: content + - name: field_dme_blog_image + options: + type: image_image + weight: 1 + region: content + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } - name: field_dme_blog_tags options: type: entity_reference_autocomplete_tags @@ -83,6 +95,18 @@ config: label: hidden weight: 0 region: content + - name: field_dme_blog_image + options: + type: image + label: hidden + settings: + image_link: '' + image_style: wide + image_loading: + attribute: eager + third_party_settings: { } + weight: -1 + region: content - name: field_dme_blog_tags options: type: entity_reference_label @@ -115,6 +139,18 @@ config: label: hidden weight: 0 region: content + - name: field_dme_blog_image + options: + type: image + label: hidden + settings: + image_link: '' + image_style: wide + image_loading: + attribute: eager + third_party_settings: { } + weight: -1 + region: content - name: field_dme_blog_tags options: type: entity_reference_label From b2c483c693c9ce258e07fc92ad31e805e408489a Mon Sep 17 00:00:00 2001 From: gitressa <3491208+gitressa@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:16:54 +0200 Subject: [PATCH 2/2] Add image and body field and storage files --- ...d.field.node.blog.field_dme_blog_image.yml | 37 +++++++++++++++++++ config/field.storage.node.body.yml | 18 +++++++++ ...ield.storage.node.field_dme_blog_image.yml | 31 ++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 config/field.field.node.blog.field_dme_blog_image.yml create mode 100644 config/field.storage.node.body.yml create mode 100644 config/field.storage.node.field_dme_blog_image.yml diff --git a/config/field.field.node.blog.field_dme_blog_image.yml b/config/field.field.node.blog.field_dme_blog_image.yml new file mode 100644 index 0000000..d2f75e0 --- /dev/null +++ b/config/field.field.node.blog.field_dme_blog_image.yml @@ -0,0 +1,37 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_dme_blog_image + - node.type.blog + module: + - image +id: node.blog.field_dme_blog_image +field_name: field_dme_blog_image +entity_type: node +bundle: blog +label: Image +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:file' + handler_settings: { } + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg webp' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: false + title_field: false + title_field_required: false + default_image: + uuid: null + alt: '' + title: '' + width: null + height: null +field_type: image diff --git a/config/field.storage.node.body.yml b/config/field.storage.node.body.yml new file mode 100644 index 0000000..73edd16 --- /dev/null +++ b/config/field.storage.node.body.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.body +field_name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: true +custom_storage: false diff --git a/config/field.storage.node.field_dme_blog_image.yml b/config/field.storage.node.field_dme_blog_image.yml new file mode 100644 index 0000000..2982fab --- /dev/null +++ b/config/field.storage.node.field_dme_blog_image.yml @@ -0,0 +1,31 @@ +langcode: en +status: true +dependencies: + module: + - file + - image + - node +id: node.field_dme_blog_image +field_name: field_dme_blog_image +entity_type: node +type: image +settings: + target_type: file + display_field: false + display_default: false + uri_scheme: public + default_image: + uuid: null + alt: '' + title: '' + width: null + height: null +module: image +locked: false +cardinality: 1 +translatable: true +indexes: + target_id: + - target_id +persist_with_no_fields: false +custom_storage: false