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
2 votes
0 answers
793 views

CKeditor Media Edit: AJAX HTTP error 500 [closed]

How can I fix the AJAX HTTP error 500 to make the "Edit media" button in the body of the CKeditor work? I am trying to use the "Edit media" function to edit an image, which was ...
Tita's user avatar
  • 29
0 votes
0 answers
253 views

How do I pre-fill a image field in a form with javascript

I've got a form which I want to fill with javascript on a button click. This button click retrieves the data via a javascript call. All regular fields are no issue, I just cant seem to be able to pre-...
Stephan de Bruin's user avatar
0 votes
0 answers
456 views

Using Feeds, how to import D7 files and images into a D8 media field

Looking for a method for importing D7 files and images with multiple values into a D8 media field. Any recommendations out there? The official Feeds issue doesn't have much activity and seems to have ...
MrPaulDriver's user avatar
  • 1,027
0 votes
1 answer
279 views

Trigger Crop API programatically after node is created

Hi I am using Image Widget Crop so that users can crop images according to predefined image styles. All would have worked fine without any issues had I been using Drupal in the conventional '...
hirani89's user avatar
-1 votes
1 answer
537 views

How to create Media video youtube entity programmatically? [closed]

I have Youtube URL such as: https://www.youtube.com/watch?v=asddasOds32 I need to create Media video youtube entity programmatically. Can I have some example code to solve this task?
Dimetry's user avatar
  • 440
1 vote
1 answer
119 views

Deprecated Dependency Warning not removing

In my Drupal 8.9.6 (Installed with Lightning distribution) Status Admin Page, there are three warnings showing after updating several modules and core to the latest versions: DEPRECATED DEPENDENCY: ...
Muhammad Mustafa's user avatar
0 votes
1 answer
166 views

How can I auto-rotate an image on file upload in a custom form?

I'm using the FAPI to provide the user an upload field for an image. The field is: $form['product_img'] = [ '#type' => 'managed_file', '#description' => 'Upload a PNG or JPG image of the ...
vintorg's user avatar
  • 1,993
0 votes
1 answer
25 views

Link video (media_youtube) to node

I have a content type called 'webtv' for adding videos from youtube with media, media_youtube modules. On the webtv page I want to add blocks with video preview image and node title. My problem is ...
isin's user avatar
  • 109
0 votes
1 answer
309 views

How to remove images from body field in views?

In the body field of a content type, I have added an image at the start. In my view, I want to show 200 characters from the body field. It also prints the image. How can I skip the photos from the ...
Shakil Ahmad's user avatar
0 votes
0 answers
116 views

bootstrap_barrio subtheme breaks ckeditor's media insert in custom block

I'm facing this problem (seems to be producible) in a contrib theme that breaks the ckeditor media insert button on custom blocks in the layout builder of individual nodes... The javascript error says ...
alec's user avatar
  • 178
0 votes
1 answer
93 views

Programmatically setting video_embed_field URL

I am trying to populate nodes programmatically from a feed (migrating earlier site to Drupal 9). So far I have managed to get everything else to move, but I can't figure out, how to set ...
hank's user avatar
  • 37
1 vote
1 answer
302 views

How to render text including video embed field

I have a formatted text field, and am using the video_embed module to allow users to embed video into that field, using the video_embed_wysiwyg submodule. I am then trying to render the field in a ...
gillarf's user avatar
  • 108
0 votes
1 answer
259 views

Scheduled unpublished content and media that is under content moderation

Let's say you have a need for the following: Content is created with content moderation, with various states. After a set amount of time, the content is deleted or archived. The user can set when ...
rumblestrut's user avatar
0 votes
1 answer
201 views

Can't update nodes / node unpublishes itself

This problem has been bugging me for some time now and I haven't been able to find this issue online anywhere else. My Drupal 7 website has a very simple photo gallery, using a custom node type called ...
JamesP's user avatar
  • 3
2 votes
1 answer
213 views

How to programmatically create an image style?

I need to create image style programmatically in Drupal 7. I found this issue: https://www.drupal.org/project/drupal/issues/2735969 and much more other issues, but all are for Drupal 8. I can't find ...
oneindige's user avatar
0 votes
1 answer
147 views

Upload multiple Standolane Media Entities (Images) without Reference Field

I'd like to Upload Images as Media Entities without referencing them in another Entity. In media/add/image I can upload a single Image. That's fine. What I'd like to achieve is a Multiple Upload ...
Makku01's user avatar
2 votes
0 answers
215 views

Show owned content in Media Library

I am using Media Library from core, but users can choose media from any user. How can I show only the content the user owns? I have tried adding contextual filter in a view, but when I change grid ...
RafaTicArte's user avatar
0 votes
2 answers
1k 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 ...
MrFox's user avatar
  • 137
0 votes
1 answer
625 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 ...
Patrick Kenny's user avatar
0 votes
1 answer
77 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 ...
MrFox's user avatar
  • 137
0 votes
0 answers
146 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 ...
nizz0k's user avatar
  • 1,172
2 votes
1 answer
973 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 ...
Patrick Kenny's user avatar
0 votes
0 answers
108 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 ...
Anon Ymous's user avatar
1 vote
1 answer
230 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 ...
Patrick Kenny's user avatar
0 votes
1 answer
330 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".
paul77's user avatar
  • 23
2 votes
2 answers
476 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?
Patrick Kenny's user avatar
0 votes
2 answers
142 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 ...
Brigitte Maillère's user avatar
6 votes
1 answer
2k 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/...
Max Starkenburg's user avatar
1 vote
1 answer
1k 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 ...
octogone.dev's user avatar
0 votes
1 answer
41 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 ...
lolcode's user avatar
  • 884
2 votes
1 answer
2k 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 ...
Maurizio's user avatar
  • 123
0 votes
0 answers
39 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 ...
Mag Musik's user avatar
  • 101
0 votes
2 answers
2k 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?
lchabrand's user avatar
  • 364
0 votes
0 answers
50 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 ...
Mojo's user avatar
  • 95
1 vote
0 answers
565 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 ...
Patrick Man's user avatar
0 votes
1 answer
2k 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 ...
Mojo's user avatar
  • 95
1 vote
0 answers
213 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 ...
Mrweiner's user avatar
  • 1,921
2 votes
0 answers
101 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 ...
mstrdruids's user avatar
2 votes
1 answer
135 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 ...
Miloš Kroulík's user avatar
0 votes
1 answer
191 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 ...
Joshua Graham's user avatar
2 votes
2 answers
1k 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 ...
lawrence_monk's user avatar
0 votes
1 answer
62 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. ...
Rohan Sawant's user avatar
2 votes
1 answer
2k 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 ...
Paul H's user avatar
  • 63
2 votes
0 answers
252 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 ...
Pete's user avatar
  • 129
1 vote
1 answer
1k 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. ...
meez's user avatar
  • 1,333
1 vote
1 answer
2k 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 ...
iainH's user avatar
  • 1,374
0 votes
1 answer
14 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" ...
bcanini's user avatar
  • 11
2 votes
0 answers
751 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 ...
lexf's user avatar
  • 23
0 votes
0 answers
438 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, ...
FR6's user avatar
  • 514
0 votes
1 answer
585 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'])) { $...
Tyler Durden's user avatar
  • 2,316

1 2 3
4
5
56