Questions tagged [media]

Drupal core has some modules to handle images and other media files, for example the Image module and the Media module.

Filter by
Sorted by
Tagged with
0
votes
2answers
28 views

Use url of media field in view twig

I need to output the url for field_slide_media in views-view-unformatted--carousel.html.twig. I can output the entity ID using: {{ view.field.field_slide_media.value(view.result[i]) }} I would like ...
0
votes
1answer
15 views

How do I add multiple images in JSON to meet Google's schema.org requirements?

The Google guidelines for article on schema.org state: For best results, provide multiple high-resolution images (minimum of 300,000 pixels when multiplying width and height) with the following ...
0
votes
0answers
27 views

How do I render an image as SVG?

I want to display an SVG image as SVG code to easily change its color using CSS. I installed the following modules: SVG image, SVG Formatter, SVG image field, SVG Image Responsive, and SVG Sanitizer. ...
0
votes
1answer
16 views

Selector bulk action missing

In the media library, I should see a dropdown selector that allows me to delete bulk items. Is there a way to turn this off and on? I've inherited this site and I'm not sure if the original owner has ...
0
votes
0answers
21 views

Can't remove image from image field on content type

doing some last minute maintenance on a D7 site. Recently needed to change some of the existing content and am finding that I cannot delete images. In clicking the "Remove" button associated with the ...
2
votes
1answer
51 views

How can I track how embedded media is used across my site?

My site uses the core Media module, Entity Embed, and LinkIt to reference media and other entities in various ways. I want to keep track of which media is embedded on which nodes. I tried adding an ...
0
votes
0answers
25 views

video.js module Experiencing an error message after install

I am using Drupal 8 and attempting to set up the video.js module. The readme file needs work so it's hard to know where I went wrong. Here is what I've done so far: installed the module using ...
1
vote
1answer
15 views

How to avoid _0 _1 when editing a media entity and changing the file?

Say I add an image using the built-in Media module. A couple months later, I have to change the image file for some reason. So I edit the media entity, delete the existing file, and upload the new ...
0
votes
0answers
8 views

How select view mode of Remote Video embedded Media for Simplenews display?

When I send out an Article as a Newsletter I want to be able to have any Remote Video embedded in the body of the Article displayed as a link; but when viewed normally in the web page, displayed as a ...
0
votes
1answer
26 views

How to include media documents in search

Is there any way to include documents I created with the media core module into the search form of the page? I only found the categories "users" and "nodes".
2
votes
2answers
180 views

How do I hide the download button on the audio player?

I want to hide the "download" button on the audio player provided by the Media module in Drupal 8. How can I do that?
0
votes
2answers
22 views

How can I manually change image orientation?

I manage a website with Drupal 7 where users can upload pictures from their mobile or from their desktop. I have configured Image Style with "autorotate" effect and most of the pictures are well ...
1
vote
0answers
38 views

Is it possible to use libraries-extend from a module (instead of theme)?

Problem/Motivation I'm interested in altering/overriding the little bit of HTML markup that's output by core, in my case Drupal.theme.mediaEmbedEditButton (from core/modules/media/js/...
0
votes
0answers
24 views

how to display a media description in a twig template?

i want to display the media description available in the file field of a media ( media of type video, audio, image, etc...), it is an option to activate: Enable Description field The description ...
0
votes
0answers
13 views

How to load existing media into media field programmatically

I have a media image called sample.jpg, I want that image to be assigned to a media field called "field_banner_image" by default when I create a node programmatically. I achieved it by using "Media::...
0
votes
0answers
16 views

How to avoid creating duplicate media file while creating media programmatically

In Drupal 8 I am creating a content with media image field, I am using theme preprocessor to attach a default image to the media field (if media field is empty) when new content is created. I used ...
0
votes
0answers
40 views

render different fields of a content type (media) in a twig templates

For the video media type of drupal 8 i want to render the fields of it into a tag. i created the template field--media--video.html.twig copy of field.html.twig i render the field like this : {% ...
0
votes
0answers
22 views

Converting embedded images from Media module to Markdown

My Drupal 8.8 site (media embed is now in core) uses the Markdown module for the Body text of nodes. I created a custom view mode, Ebook export, which has some twig templates that output the raw ...
0
votes
0answers
12 views

Translatable Referenced Entity field as filter for View

I have a multilingual Drupal 8.7.10 site (English and Czech, in this case). Content types Article and Basic Page are translatable and both have some Entity reference field referencing some Media type....
0
votes
0answers
59 views

“Instagram embed” display format (Media Entity Instagram) does not display videos

Trying to configure Media Entity Instagram, following https://drupal-media.gitbooks.io/drupal8-guide/content/modules/media_entity/instagram.html. TL;DR: I have an Instagram media entity getting its ...
0
votes
1answer
24 views

Why are existing entity reference fields not available to add to a media type?

I have a number of existing entity reference fields in my site. The key one is a taxonomy reference field called field_search_terms. I would like to add this field to the Document media type. However ...
1
vote
1answer
73 views

Folder permission errors on public:// after upgrade to 8.8.5

I'm new to this community, and asking for help because I'm stuck on this problem, and cannot go past. I've also tried asking on StackOverflow, but with no luck so far. My current setup: Drupal 8.8.5 ...
0
votes
0answers
21 views

Using Photos Albums and enabling plupload, there's no way to upload

I'm attempting to use photo albums to make a photo gallery. if I don't select the Plupload checkbox for file uploads, when I add content, I have the facility to upload 5 different files. When I select ...
0
votes
2answers
34 views

How do I load a Media entity from a File entity?

I have a File entity loaded programmatically. I want to load a Media entity from it. Is there a way to achieve this?
0
votes
0answers
12 views

Vimeo embed code being ignored

Feeling frustrated. I run an number of websites, and have recently had need to embed video (mostly Vimeo but not exclusively) in one of them. I have another site where I have embedded the code ...
0
votes
0answers
22 views

Is there a way to use the core Media module with an existing image field?

I have a site with a lot of nodes already using an image type field where I'd like to switch to using a Media browser (for consistency with other areas of the site). It seems a media browser can only ...
0
votes
0answers
21 views

How to upload image to media library? (No upload field)

I'm missing something in media_library. When I click "Add media" in the media library (/media/add/image) there's no browse/upload field. All of the other media types have an upload field. This ...
1
vote
0answers
43 views

How can I populate and entity reference field/videos that have been previously migrated to the media library?

Upgrading from D7 to D8, we previously migrated D7 youtube and vimeo videos to the Drupal 8.8 core media library. We now are attempting to migrate the Video nodes and their media library video fields ...
0
votes
1answer
14 views

Unable to add images to content “Image field is required”

Developing a new site with Drupal 8, I was attempting to add an image to a custom block. In the editor I clicked the image icon and got a dialog to upload an image. After specifying a file (making ...
0
votes
0answers
15 views

Possible to set image style based on aspect ratio instead of px dimensions?

I'd like to create an image style that uses an aspect ratio, so that images maintain their general dimensions but get cropped based on that ratio. Essentially this would mean that a 16:9 image style ...
1
vote
0answers
25 views

Media Library uploaded images don't get the derivatives generated with the Image Style Warmer module

I am using Drupal's Image Style Warmer module to generate derivatives for images uploaded to Drupal. But it is only working if the images are uploaded through "Content->Media" tab. I was trying on my ...
2
votes
1answer
32 views

Missing tabs in Media Library widget in Drupal 8.8

I'm trying to set up Media Library widget in Drupal 8.8. But for some reason, no tabs are available for selection in the widget settings. Please see following screenshots: Do I need to install some ...
0
votes
0answers
12 views

How to get an generic image icon for image field type (like Generic File formatter for file field)

I have media field on a paragraph entity. This field can hold media types, files, image etc. Looking at admin/structure/media/manage/file/display there is a generic file formatter. However, for image ...
0
votes
0answers
9 views

Image inserted into Ckeditor via Media widget exists when viewing config storage in custom form but not outside of custom form. Example below

I have a custom form like: public function buildForm(array $form, FormStateInterface $form_state) { $config = $this->config(static::SETTINGS); // dpm(check_markup($config->get('...
0
votes
1answer
193 views

How can I reference previously imported media entities?

I have been trying to attach media entities to node entities in Drupal 8 with a custom migration but despite numerous attempts and countless hours reviewing forums i'm stumped - I'm desperately hoping ...
0
votes
1answer
31 views

I am getting a PDO error which seems related to the Media module

After Drupal 8.8 upgrade media module is not working. In admin media links are not working e.g /admin/content/media Error : The website encountered an unexpected error. Please try again later. ...
1
vote
1answer
161 views

How can you display document file sizes next to a media link button?

I'm trying to display the file size of a file next to a media link button on a page. I have two content types with a media entity reference field in each. Each field is restricted to only pull from a ...
0
votes
0answers
38 views

How can I set Focal Point coordinates in a View or Twig?

I use the Focal Point module in D8, and I'm trying to figure out how I can access the X and Y coordinates of the focal point through Twig in either a view or Twig template so I can use them as ...
1
vote
1answer
109 views

Render media url in node--page.html.twig

I have an Entity reference field field_video. It's a core Media field with a Reference type of Remote video. Because I use this field_video in my Hero section I need some additional markup here. ...
1
vote
1answer
171 views

Align embedded Media Images

When I embed an image into CKEditor text I can choose alignment options. When I embed a Media Image I cannot choose alignment, but a Media View. A media View allows me to specify image size (via image ...
0
votes
1answer
11 views

Media Title appearing in View when HTML is stripped

I've run into an issue with media in a view. I have a view using bootstrap grid to display body field content. The view field content being displayed is setup to strip out HTML, but the word "Image" ...
1
vote
0answers
96 views

Autoplay embed video added from core Media module

Is it possible to, somehow, enable embed video autoplay for a field added form Media module? For example media type "Video" has this option, but type "Remote video" doesn't. Embed video field is ...
0
votes
0answers
34 views

Hook or event when Media file is inserted/updated/deleted but only when node form submitted

I created a field of type "Entity reference" and referencing an item of type Media. In other words its an image field. I would like to execute code with an hook or an event when an image is added, ...
0
votes
0answers
86 views

When I try to load an media entity with $mid and entityTypeManager->getStorage get nothing

I'm trying to generate a field formatter, and I get this error: Error: Call to a member function getStorage() on null en Drupal\svg_url\Plugin\Field\FieldFormatter\Url4SvgFieldFormatter->...
0
votes
1answer
80 views

Create media from blob

I am receiving a payload with blob files. I would like to store them as files and create a media entity. Here's the code I have to create the Media object if (!empty($payload['blobFile'])) { $...
0
votes
2answers
74 views

How to use media field with entity browser widget in a frontend theme?

I have created a media field in my content type. In the manage form display, I have selected entity browser as display instead of media library. When I open the node form as admin in an admin theme ...
0
votes
0answers
14 views

How to get the node title which is related to file in File usage view?

I am just trying to list out the nodes which are linked to files in the File Usage view. That will show up in this URL: /admin/structure/views/view/files/edit/page_2. In this view I tried to add ...
2
votes
1answer
31 views

How to get the media that owns a file?

I have a file and I know there is a media that references it. How can I get this media? In the opposite direction, knowing the media id, I can get the file: $media = Media::load($mid); $fid = $media-...
2
votes
0answers
116 views

Entity browser or Media Library for PDF uploads?

Client has a custom Content Type for for downloadable PDF document detail pages, which contains an entity reference to the File media type. They want Full and Teaser view modes to display a thumbnail ...
0
votes
1answer
36 views

Load Media File in Webform Mail Handler

I want to use a single webform to send download links with specific media files to visitors that fill out that form. For example on an URL like this: https://example.com/downloads?media=1234 The ...

1
2 3 4 5
53