Questions tagged [media]

Drupal core has some modules to handle media files, such as the Image module (Drupal 7) and the Media module (Drupal 8). Other modules handling media are third-party modules.

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

Views image field

I'm trying to add inline styling to my Drupal image using the image field under view. No matter what method I try, nothing is working. I've run out of options. Any help? Below are a few code ...
0
votes
0answers
77 views

How to get slideshow for a node fields display, having multiple images and multiple videos?

I have a content type having image field and video field,where multiple images and multiple videos can be uploaded. In a node page display,i want to show all images and videos in a slide show. I tried ...
0
votes
1answer
130 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
152 views

Module for helping with image usage rights?

Our news director used an image he shouldn't have and now the photographer is asking for $5,000. I think we'll settle for less. Now the top brass are asking me to delete from the server all the ...
0
votes
1answer
20 views

How to add a profile cover with a user field image in a view? [closed]

I am trying to add a cover image to user profiles in a block view, the image comes from a user profile field. The problem is that I need the path to that image because my neede code is like this: &...
1
vote
1answer
450 views

How can I disable image resizing in CKEditor?

Our site is responsive and when editors use the resizing handles after uploading an image into the editor, it puts in fixed width and height on the image. We don't want them resizing images at all, ...
0
votes
1answer
223 views

How to add a title text input to an image field node form widget

If you have an image field widget in a Drupal node form you can automatically edit the image alt text in there, but is it also possible to add a title text field? When I install the File Entity ...
0
votes
1answer
52 views

Print image from filepath in Twig

I have a paragraph with an image field. If the image field is empty, I want to display a default value. I do not want to just set the default image because an editor could remove that. Here is my code ...
0
votes
1answer
35 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 ...
0
votes
1answer
78 views

How do I bulk update the alt and title tags of images

Is there a way to bulk update image title and alt tags? Where do alt and title tags are saved in the database?
3
votes
0answers
2k 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
73 views

Add a default value for existing Image alt field

I have an image field in article content type and have created hundreds of nodes for article content type, but now I need to add a value for image alt fields for these existing nodes. Even the default ...
0
votes
1answer
180 views

Add fields to image upload option in CKEditor

I make SVGs using LaTeX and would like to upload both the image and its LaTeX source code when I attach an imagine via CKEditor. I don't want the code to be displayed, just stored with the image so ...
-1
votes
1answer
72 views

Two step media creation form? [closed]

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

Image Styles Not Generating Thumbnails/Previews

I have File Browser installed on my website. The module info can be found here: https://www.drupal.org/project/file_browser When I go to browse for pictures, there are no images. You can see what I ...
0
votes
1answer
164 views

Webform image select element is dispalying another image while used in webform handler

In drupal 8, I have created a custom webform handler to create a new article node and copy the data and images from the webform element to the created article node. In both artcle node and contact ...
2
votes
0answers
359 views

How do I migrate images and image data?

I used the Drupal migration module (browser) to migrate a Drupal 7 site to Drupal 8. Even though I had to restart the migration a few times, it migrated all the users and the nodes. I can't figure ...
1
vote
0answers
548 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 ...
1
vote
0answers
311 views

How to migrate images?

I'm trying to import images, but why does migrate_tools swear on my yml file when I try to migrate. id: migrate__articles_teaser_images1 label: 'Migration teaser images of article' migration_tags: ...
0
votes
1answer
68 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-...
2
votes
1answer
468 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 ...
0
votes
1answer
116 views

How to associate the last image from gallery to user's profile picture

In Drupal 7 (Commons 7.x-3.46). I've created a new content type, by which each user can upload images and build a personal picture-gallery. How can I now associate the last-uploaded-image to the ...
1
vote
0answers
237 views

Get image url with https instead of http

When I use file_create_url it return url with http instead of https. Code Snippet: $desimg = file_create_url($node->field_image->entity->getFileUri()); Due to which i m getting warning ...
1
vote
1answer
679 views

Save and set an external link image programatically

I have a field that will accept an image link coming from the external source. But of course, to set that image I have to save it in Drupal first. I'm wondering how do Drupal save the image from an ...
0
votes
1answer
512 views

Cannot insert images in body of a basic page

I am using CKEditor and WYSIWYG. After updating Drupal core to 8.5.6, I cannot upload an image using the CKEditor's 'image' button anymore saying "Image Field is required." I have checked CKEditor's ...
0
votes
1answer
252 views

How can I access the raw value of a view in a template?

I am looking for a way to get the url of an image dynamically to put it as a background. So I created a view that get the image field of the node or taxonomy term, which is supposed to output the url ...
0
votes
1answer
179 views

Image widget crop not returning multiple derivatives in JSON API

I'm using below modules for image crop https://www.drupal.org/project/image_widget_crop https://www.drupal.org/project/cloudinary https://www.drupal.org/project/consumers https://www.drupal.org/...
0
votes
1answer
30 views

User Created Slideshow

I am new to Drupal and I'm looking for a slideshow of user uploaded images on a user uploaded project. Basically, I want the user uploaded images to be shown on the content page, in addition to text, ...
-1
votes
1answer
118 views

Link image to new tab [closed]

I have a problem trying to link image teaser to open in a new tab when clicked. How do i go about that? I know in html is target="_blank" attribute.
1
vote
1answer
88 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 ...
-2
votes
2answers
142 views

How do I upload a background image?

I want to insert a background image in the IBM API Connect theme. I first googled, and I found how to insert an image in a node; then I downloaded the Background Images, the Background Images ...
1
vote
2answers
1k 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 ...
0
votes
1answer
25 views

Formatting text below an image

I'm a total newbie. I'm building a site which includes images, such as photographs, with text captions under them. Recently (?!), some of these text captions have broken and slipped, with the first ...
1
vote
2answers
904 views

How can I use a media field in a custom form?

I tried something below, which is not working in drupal 8. $form['upload_documents'] = [ '#type' => 'media', '#tree' => TRUE, '#title' => t('Upload your ...
2
votes
2answers
346 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 ...
-1
votes
2answers
290 views

embed photo album hosted on flickr.com using flickr module not showing photo album

I am attempting to use the Flickr module flickr-8.x-1.0-alpha2 along with Flickr API and Colorbox module to display a album of recent photos from Flickr.com. I have setup the API keys. and added ...
1
vote
0answers
65 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
55 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
11 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
886 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
66 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
26 views

Add wrapper to all images

I want to add a wrapper to all images on my site in drupal 7. None of these images were inline elements so I can’t just directly edit the html code. I’m fairly new to drupal so I’m still figuring out ...
0
votes
0answers
330 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 ...
2
votes
2answers
1k views

How to get height and width of image style?

We have a custom module mymodule where we call mymodule_tokens so that we can assign custom token values from the current node. These custom tokens are used to insert values in the Article's MetaTag ...
1
vote
1answer
22 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 `#...
1
vote
2answers
43 views

Pages are created for each image

The Drupal 7.59 installation we have a new page for each uploaded image in the files directory. (It's been like this at least since Drupal 7.39 when I joined this project.) If the image is awesome-...
0
votes
0answers
257 views

Is there a way to auto populate the Alternative text using the image file's Alternative text?

We have an Article content type that has an image field, field_image. On upload of a new image, the Name and Alternative text is provided. When we attempt to add the image to the Article node, we ...
3
votes
0answers
213 views

How can I convert an existing 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
221 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
36 views

Image Field Caption not showing on inserted images

I've added Image Field Caption module to my site, and the caption field now shows up underneath each image field perfectly. However, when I go to the page, the caption doesn't show up. From what I can ...