Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [media]

Use it for questions about the module for managing files and multimedia assets: the Media module.

0
votes
0answers
7 views
+50

Troubleshoot File Usage Data

How do begin to troubleshoot possible issues/errors with file/[id]/usage. For example, it lists an entity that does not appear to be using the file. Is there a way to track down how/where it gets ...
0
votes
0answers
22 views

Youtube media thumbnail size

I want to control the thumbnail image size for my media entities of type video. The thumbnail image size being fetched by the media module from Youtube has 480 x 360px. I want to use the 1280x720 ...
0
votes
1answer
13 views

Within a View, How do i paginate the content found inside a single Multiple file field, i.e. inside one node

Hopefully someone can help. I am using a file field and allowing unlimited files within a single content type field called "Video", handled by Media Module. I have created a view per "gallery" of ...
0
votes
0answers
12 views

Wrong media file is getting referenced on the node edit form [closed]

I am having a content type where there are multiple paragraphs. among those paragraphs, I have banner as a paragraph and file field in other separate paragraph. The banner paragraph is having a image ...
0
votes
0answers
8 views

Entity Reference Field - Videos

I am trying to use a entity reference to get the media value by using the target id to create a uri and url. The problem is that the way it is working now is that the id is grabbing is node id and not ...
-2
votes
0answers
19 views

Libray thumbnails not showing

I'm setting up a site in Drupal 8.6.4 using the Media and Media Library, but I'm having issues with the thumbnails not showing when browsing or adding new images. It's a clean installation of both ...
0
votes
0answers
12 views

Can I build a product extranet that lets me export product information as csv with drupal 8 and existing modules?

I am trying to build an extranet platform (using drupal 8) where suppliers can create new products and request approval of those products. Once approved by myself they get a notification that they can ...
-3
votes
0answers
14 views

Add title text property to image in ckeditor

Is there a way to add the title attribute to CKEditor images?
1
vote
0answers
36 views

Cannot update my website from 7.60 to any higher version

My website is currently running on the agov-7.x-3.x-dev core and the 7.60 drupal core version. I tried to update the site to Drupal core 7.61, but site showed a fatal error. Fatal error: Class '...
1
vote
1answer
105 views

When adding media to content, how can I search for the media by tag or term?

In Drupal 8, I created a new Media type "PDF Files." I have imported almost 30,000 of them, each complete with Title (Name), file, and the taxonomy that categorizes them. On the content type (Let's ...
0
votes
0answers
18 views

Dont show results a user has no permissions to

I have created a view that list media entities that are related to the module: Groups. These documents have certain restrictions to them. Each document can get 1 of 4 permissions: Permission A ...
1
vote
0answers
27 views

How capture video thumbnail , when video is uploaded under media video type file?

I'm using Core media module to upload video[Media Type is video,which has field video of 'file field type']. This module will refer video.png as thumnail for all video uploaded from the local system. ...
1
vote
1answer
45 views

Get Link value in Media entity

We have a Media type called Documents that has a Link field called field_link. We need to obtain the URL (external or internal) from the field so that we can use to wrap block elements inside of a <...
1
vote
1answer
28 views

Why are media files used in zero places not deleted?

Unused media files (.jpeg .mp4 etc.) are remaining permanently even though unused. This is shown in the /admin/content/files page in our Drupal 8.6.3 system. It could be that, at migration from ...
1
vote
1answer
47 views

Media Module: How to enable SVG files

I can currently upload with an Image field for SVG. I am using the SVG image module. I just installed the Media module so I can use the Media library functionality. However when I add a new Image ...
-3
votes
1answer
38 views

How to download a file from a system folder when a link is clicked? [closed]

I have a file("abc.csv") that is stored in the local system (for example: /var/a). I need to download the file when I hit a link in a Drupal site.
2
votes
1answer
52 views

Naming conventions in Media entity vs File entity

The Media Library experimental module in core introduces a generic media type "file", while File entity calls the same thing "document". For comparison, the other bundle names are consistent between ...
2
votes
1answer
250 views

Get Video URL from Media Entity reference field

I have an entity reference field to Media Video. I'm trying to get the uri to the video file in node template. Most of the solution I found around is regarding Image/File. But not Video. Tried Twig ...
0
votes
1answer
48 views

Image upload: Failed to open output stream

I created a media entity browser and for the image upload widget i choose the DropzoneJS.The widget settings are in the image bellow, pretty standard. And regardless of image type (png, jpg, jpeg) ...
0
votes
1answer
42 views

Can't import configs on server due to some entities

So when i try to manually import configs (/admin/config/development/configuration) i get these messages: Entities exist of type Media and Media type Image. These entities need to be deleted before ...
0
votes
0answers
28 views

how to view media revisions

hi I see that media revisions are now in the latest drupal version, and it looks like there is code to allow viewing the revisions for Media, but I cannot find the path or what has to be enabled to be ...
0
votes
1answer
32 views

How to display current pages the media entity is referenced during deletion?

We are using Media Entity module that provides a Document media bundle. On our Article content type, we have created an Entity Reference field to Media that is set to Document media bundle. When you ...
1
vote
0answers
1k views

How do I practically use the media library?

Now that Drupal 8.6 is released, I tried the experimental Media Library module. It works great, but it needs some additions. How can I use core Media Library with CKeditor? How can I fill custom ...
0
votes
1answer
63 views

Two step media creation form?

It would seem very logical to pick the media source first, and then have the field map mechanism fill in the fields based on the metadata the source entity provides via the media source plugin. I am ...
1
vote
0answers
258 views

How can I add classes to images added in CKEditor via Media?

Similar question to How to set width to Media entity image in CKEditor BUT I am trying to do more than insert various sizes of images, I want to add classes to the actual img tag. So when I insert an ...
0
votes
1answer
44 views

How to use (reference) the uploaded file to a media(video) type?

I have read https://www.drupal.org/node/2941420 and I can upload a image file then use it in article. But I can not use it as video field after I upload a video file. My Drupal version is 8.6.0-...
1
vote
1answer
168 views

How can I create multiple cropped Media images without re-uploading them?

Solutions that I've found allow to crop Media, type Image when I've uploaded an image, but the media entity is not yet created (on the "Add media" page). I need to upload a large full image once (and ...
1
vote
1answer
35 views

I am not able to override the form #access setting [closed]

I cerated a form alter with the file entity media upload browser. I studied this answer of how to alter this form. I then debugged and found that for what I wanted to do, I am in step 4 of the file ...
0
votes
2answers
342 views

How to get fields of media_entity?

We have a view that returns a Media_entity (Drupal\media_entity\Entity\Media) using the following in a hook_preprocess_view_views hook. When we try to access the field_media_type variable, I get a ...
-1
votes
2answers
270 views

How can I use media fied in a custom form in Drupal 8?

I tried something below, which is not working in drupal 8. $form['upload_documents'] = array( '#type' => 'media', '#tree' => TRUE, '#title' => t('Upload your documents'), '#...
2
votes
2answers
203 views

Display a Media Entity Image from other (referencing) node in a Twig template

Seems that all found in the Internet does not work for my case. :/ In general, I need to display an Image and a Project, referenced by the node that has a reference field to my node. I have: a node ...
0
votes
0answers
30 views

How do I get a direct download from a path like /media/<media id>?

i'm wondering how anyone using drupal 8 is handling files using the newly added to core media module. For example, uploading a document using media module, to be linked to by multiple pieces of ...
0
votes
1answer
29 views

Gray overlay and no dialog when clicking Image button in CKEditor

Attempting to get CKEditor and Media to work together on a Drupal7 site. Things are mostly working great, but when I click the regular Image button (or double-click an image, or use the context menu ...
0
votes
0answers
10 views

Media library: don't include profile pics or remove from library without deleting

Our site allows users to create a profile avatar. We are also using the media module, version 2.19, which includes a media library. The library is useful, however, all of our users' profile images ...
-2
votes
1answer
375 views

Custom migration: image fields to media [closed]

When migrating existing Drupal 7 fields, most things work. I need to convert images (using image upload) in Drupal 7 site to reusable media. Any help?
0
votes
0answers
39 views

Deploy Media Field Images From Staging to Production

I'm trying to find a way to copy nodes (plus associated images) and (ideally) users from a Drupal 7 staging site into production. In theory, this "Deploy - Content Staging" module is perfect: https:/...
0
votes
0answers
152 views

Link to a Media entity file from text editor

The idea is to create an hyperlink on some arbitrary text typed in CK Editor. That link should target a file uploaded to a Media file entity. Media entity download filter already makes it possible ...
0
votes
0answers
129 views

Change image paths from absolute to relative.

I have a Docker-Drupal 8 multi-site app in production, created by a third party, where every image uses an absolute path, so they get served from an unique server which makes the sites slower. Being ...
0
votes
0answers
17 views

How (if even possible) can I get a field value from an unsaved parent entity to use in a referenced entity?

I have two media types: Document (main) Name DocID Description Year Main file (file reference field) Supplemental files (optional, multi-value media reference field) Document (supplemental) Name ...
1
vote
1answer
20 views

How can I set the default value for a Media form element?

I am using Media 2.0 and a media field in a custom admin form. I am trying to set the default value as described on https://www.drupal.org/project/media/issues/1158760#comment-12656764, but `#...
3
votes
0answers
101 views

How to convert an existing D8 image field into a Media Image reference field?

I have an image field that I created before Drupal 8.5, when media was introduced in the ui. The field already contains content and I would like to make use of the reusable media functionality that is ...
1
vote
3answers
89 views

Rendering semantic HTML5 caption

Is there a way to render HTML5 captions in Drupal 8? I've tried with embedding images and embedding media in the WYSIWYG, and I've also tried with media migrated from D7 to D8, but nothing works. An ...
0
votes
0answers
29 views

Remove character limit for Caption on CKEditor with Media embed

I need to remove or overwrite the maxlength attribute for the caption (currently 128). There is another similar/identical question on this website, but the solution provided is not working. Is there ...
0
votes
1answer
308 views

Problems upgrading Media from 8.3 to 8.5

I have a Drupal 8.5.3 site (built from the composer project) that was previously on the 8.3 branch before the critical security updates forced me to update to 8.5. One of the things I missed in the ...
0
votes
0answers
89 views

Entity Browser Widget Validation

I am using Drupal Lightning 8.x.2.2.3. I want to restrict the file upload extension to only jpg , gif when uploading through the Ckeditor. I am using the Entity browser File Upload Widget. Currently ...
0
votes
0answers
79 views

Media browser Embed button does not restrict library to selected file entity bundles or Media type

I am using Drupal Lightning 8.x.2.2.3. And I am using the the built in Lightning Embed button (the one with the Star icon) added to the Ckeditor to add media to the body. The Embed button is using the ...
1
vote
1answer
261 views

How to convert the drupal-entity tag into an img tag?

I have a content type with a text field that uses CKEditor, in the editor is possible to add a media entity image, once the image is inserted inside the text the html tag for it is: <p>Document&...
0
votes
0answers
38 views

Is media _oembed in Drupal 8

The media_oembed page shows only D7 versions. Since media has been ported to Drupal 8, I was wondering if the module includes this functionality.
3
votes
1answer
940 views

Selecting an SVG as an Image Field value

I have a Content Type, News, with an Image Field, News Icon. When the field settings are viewed at /admin/structure/types/manage/news/fields/node.news.field_news_icon I have supplied SVG as one of ...
0
votes
0answers
51 views

Specify the widget type for a form field which doesn't have a related entity

We have a custom form with an image field and want to use the entity_browser widget from the File Entity Browser module, however it isn't displaying the uploaded content. The code we have so far: $...