Change field_image to field_ad_media

Created on 10 June 2023, almost 2 years ago

Problem/Motivation

Image is deprecated.
Media is in core.
Can we use media and give it a module specific name to take advantage of media's flexibility.

It also allows for other advertising types.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

4.0

Component

ad module

Created by

🇺🇸United States SocialNicheGuru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SocialNicheGuru
  • 🇩🇪Germany Anybody Porta Westfalica

    I think this should be discussed. The question is, if the field content is really being reused. I think for banners that's often not the case.
    And for specific cases you could just add your own fields. Maybe it's still good for basic installations?

  • 🇮🇹Italy plach Venezia

    Given how common the image/media use case is, compare to text only, I think we could even have an media entity reference defined in code as a base field.

  • 🇺🇸United States SocialNicheGuru

    It also avoids conflicts with modules that use field_image

  • 🇩🇪Germany Anybody Porta Westfalica

    Thanks for the feedback. I'm still not a too big fan of switching the image field into a media reference field, as I think especially for advertisement the media-reuse is low and the banners used may have a very temporary nature. For that an image field might still fit better.
    But of course that's just my experience and oppinion.

  • 🇩🇪Germany Anybody Porta Westfalica

    @SocialNicheGuru if you're still interested, please create a MR that allows replacing the image field with a media field as custom solution or using a submodule. In effect, I think of adding output support for a certain media field name, if it exists. If it doesn't exist, the image field is used.

    Maybe that could be done in a preprocess hook for example or directly before the theme() call.

    If you don't need this any more, please close the issue. We have no need for this and I don't think you typically want the advertisement banners in media library.

Production build 0.71.5 2024