Questions tagged [media]

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

843 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
631 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 ...
Pekens Antoine's user avatar
4 votes
0 answers
458 views

Image styles are not generated in Docker for Windows

When I open in browser http://localhost:1567/sites/default/files/styles/thumbnail/public/2017-10/478069720_1384178114_4.jpg, I see 404. The "original" images are uploaded successfully, and the ...
milkovsky's user avatar
  • 5,334
4 votes
0 answers
1k views

Why are the thumbnail images not loading?

I am using Drupal 8, and have just moved my site to shared hosting. When I upload a standard image field on my shared hosting environment, the thumbnail image does not show up. This works perfectly on ...
mike421's user avatar
  • 41
4 votes
2 answers
3k views

How can I create an image gallery?

Currently I am running in D7 with the following modules: Media 7.x-2.0 Views 7.x-3.7 Colorbox 7.x-2.4 I am trying to create an image gallery using these modules with the following steps. Please ...
otc61686's user avatar
4 votes
2 answers
1k views

Upload file and fill in fields in one step; or trigger a rule when a file is uploaded

I want to make use of the Media module and the File entity module to upload files, in particular images, to my site without having to attach them to a node. Solely uploading images works like a charm, ...
deinqwertz's user avatar
4 votes
3 answers
845 views

User contributed image gallery, per node

Working on a new Drupal 7 based site. Put together a few sites back in the 5 days, but lots has changed. I'm looking to allow users to upload images to a particular content type, and to show those ...
Laizer's user avatar
  • 141
3 votes
0 answers
167 views

File can not be copied during migration of media entity

I'm migrating pictures into Drupal (9) media entities (image). System is using AWS S3 for local storage. I have 2 migrations: First migrates external images into drupal's files. It copies files from ...
MilanG's user avatar
  • 509
3 votes
1 answer
919 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. ...
rks's user avatar
  • 399
3 votes
0 answers
3k 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 ...
Pixelstyle's user avatar
3 votes
1 answer
1k 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 ...
Oksana's user avatar
  • 75
3 votes
0 answers
146 views

Template name suggestion for multivalue image field in paragraph module?

How can I create a dedicated template name suggestion for paragraphs multi value image field? The below HTML comments are the theme hook suggestions added by the debug function, for the paragraph ...
Mojtaba Reyhani's user avatar
3 votes
1 answer
2k views

Entity Browser in Forms API

I'm having trouble getting the entity browser widget to work correctly in a custom form. Just wondering if anyone has had any success in getting it working. I've got to the point the button is ...
phob0s_'s user avatar
  • 31
3 votes
0 answers
272 views

Delete the original image after cropping it with the imagefield crop module

The title says it all. When I upload a big image of 5MB but I only need a small part of it I can cut out a part (=crop). I can then use that cropped piece for other purposes. But I never need the ...
user1541645's user avatar
3 votes
1 answer
301 views

Image gallery with mobile view optimization

I'm using Drupal 7, and I want to have a photo gallery. When viewing the gallery using mobile phone or ipad, I wish to have the photos shown like facebook photo gallery: image will auto resize ...
vences's user avatar
  • 620
3 votes
2 answers
869 views

How to use the gallery formatter settings in a display suite code field?

I am using the gallery formatter module to format photo galleries. To satisfy a requirement I need to create a Display Suite code field that displays the list of pictures attached to a related node (...
znat's user avatar
  • 1,047
3 votes
1 answer
342 views

Image upload broken when editing content

Sorry if I'm using incorrect terms here. What's going on is, when I edit any content, as the the types of content under 'Content Management > Content Type', there's the Image: field, which I think is ...
noexit's user avatar
  • 31
3 votes
2 answers
645 views

Problem with image width in views/ block

I have a problem to set image dimension on various position. I want a 300x100px in top, 100x75px for thumbnail and other dimensions on other place. In WordPress I can just add "width" attribute to set ...
sumedi's user avatar
  • 31
3 votes
0 answers
1k views

How to use JW Player Video Module, To Stream Video Intelligently, w/ bitrate switching. Is it possible?

I'm not a developer, so excuse any terminological or module reference errors, but as I understand things, the title sums up our primary obstacle. We can store video files on AmazonS3 and distribute ...
Webrenaissance's user avatar
3 votes
1 answer
407 views

Adding images to a node

Is there a way to programmatically add an array of images from a particular file path? I want to add all the images from one folder in my drupal site and add fancybox styling to them. Can this be done?...
James30's user avatar
  • 119
3 votes
1 answer
292 views

Can't remove document file from Media

I've created a WebForm that allows a user to upload a document file. The file stores to Media which I'm using for images. I can delete the image files but I'll be dog-gone if I can figure out how to ...
Diane's user avatar
  • 31
3 votes
2 answers
465 views

Field in Custom Content Type Stripping out <img> tags

Drupal6: I have a custom content type, with a custom field, set to textarea. The content type's instance filter is set to Full HTML. When I add an image tag to the custom field, the image renders in ...
Aaron's user avatar
  • 347
3 votes
1 answer
465 views

Altering ImageField Widget with FUpload enabled

I need to alter the ImageField Widget so that I can add some fields other than the Description, Alt and Title fields. I'm able to do this when I select the file field widget type as Image Uplaod, but ...
user avatar
3 votes
1 answer
454 views

Select an Image style depending on external/dynamic factors (theme region or other field content)

I have a Bean (bundle that generates blocks) which I display in one of 2 different theme regions. Either in the header, or the footer. This Bean contains an Imagefield, which is rendered through an ...
Tom Kirkpatrick's user avatar
3 votes
1 answer
903 views

how to optimize inline images in ck-editor

Is it possible to optimize inline images uploaded via ck-editor. There is an image with size 11 MB and in default behavior its rendered original without any optimization applied to it.
echo's user avatar
  • 1,489
2 votes
0 answers
160 views

How to duplicate/clone a field in a content type

I have a custom content type with an image field. I want to convert this image field into media type. There are already thousands of nodes created with this content type. One of the ways I've ...
ShadowAce's user avatar
2 votes
0 answers
598 views

Allow users to upload heic images and auto-convert to jpg

It seems that heic images are increasingly popular way to store images (the default image format since ios 11, but browsers do not support them. Site visitors may attempt to upload an heic image from ...
greggles's user avatar
  • 5,242
2 votes
0 answers
47 views

What is the equivalent of hook_image_styles_alter()?

I would like to allow uploading of SVG images to all the existing image fields with image effect. However, I wouldn't like the image styles to be applied to SVG images, as it is mostly designed for ...
Binny's user avatar
  • 890
2 votes
1 answer
217 views

How I can insert some help text on the ckeditor media embed "Create embed" tab?

How I can insert some help text on the ckeditor media embed "Create embed" tab? Oddly, I can't even find those words together in code. I have a user confused about its use, so I want to ...
shelane's user avatar
  • 511
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
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
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
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
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
2 votes
0 answers
452 views

Programmatically update remote video thumbnail

Scenario: YouTube video was previously unlisted, so thumbnail not retrieved and now needs to be, or chosen thumbnail has been changed and needs updating. There are a couple of core issues open on ...
William Turrell's user avatar
2 votes
0 answers
70 views

Define a default image when using image as base field in custom entity

I defined a custom entity type with an image base field. Now I want to have a default image which seems to be quite tricky: when I define a default image on a field api field and export the configs I ...
Tobias Krause's user avatar
2 votes
0 answers
857 views

How a media image entity_reference field in a custom content entity can be set to translatable?

I created a media image field in my custom entity content: $fields['image'] = BaseFieldDefinition::create('entity_reference') ->setLabel(t('Promotion image')) ->setDescription(t('...
osman's user avatar
  • 674
2 votes
0 answers
531 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 ...
josephgut's user avatar
2 votes
0 answers
601 views

Image styles not generating when an unrelated htaccess rule is active

Having a very bizarre problem on Drupal 8.4.4. I have a custom module which accepts an image through a POST request and saves it as the submitting user's profile picture. This module has been in ...
saramm1's user avatar
  • 727
2 votes
0 answers
354 views

How do I get all the image files and clean them up?

On my Drupal 8 website I have created multiple media contents and uploaded image file to each content. When I update new image of a media content, the old image file remains unused in the image ...
O Connor's user avatar
  • 129
2 votes
0 answers
394 views

Adding protection against hotlinking to .htaccess breaks generation of styled images

Drupal 8.3.4, Apache, Image Magick toolkit (via Imagick module). I recently discovered some annoying hotlinking to my site siphoning my bandwidth and decided to disable it. Added the following to /...
Marassa's user avatar
  • 81
2 votes
1 answer
625 views

How to convert an image field to an entity reference field

We have Drupal Paragraphs using image fields that are media entities. When the media entity is updated with a new image the old images still show unless we manually edit each page, remove the image ...
Andy Glover's user avatar
2 votes
1 answer
68 views

Field_image empty after database export and import

I exported my previous D7 database (db1), and imported it into a new database (db2). That said, all of my data (pages, articles, content, etc) seems to have exported the way it should... EXCEPT for ...
Blair Warner's user avatar
2 votes
1 answer
257 views

How to Add Image Field in CIVICRM

I am trying to add an Image as Custom field in Civicrm Contact, but the Image Field type is not in the Custom Field section. It has only Field type as File. How to apply Drupal Image styles for ...
Zlahc's user avatar
  • 21
2 votes
0 answers
71 views

Using Caption Filter Module with Media Module 2.x

I'm seeking a good method for non-technically savvy users to easily caption images. Caption Filter seems an excellent method to achieve this, however, even though this article says it is compatible ...
Travis's user avatar
  • 457
2 votes
2 answers
986 views

Show custom banner per page

Admin user wants to be able to upload image banners and select on which pages/nodes/views/panels to show it when visited (as a wide screen image banner above title). It means when creating the banner ...
user13176's user avatar
  • 740
2 votes
0 answers
567 views

How to allow uploaded image brightness and contrast to be edited with a UI like a slider?

Many sites, like eBay to give a well-known example, allow users to edit images they upload with a slider or buttons to increase or decrease brightness and contrast. When the UI is used, a new image is ...
user56reinstatemonica8's user avatar
2 votes
1 answer
835 views

How to change the image style for image preview in node-add/edit form?

IN a related question, "How to set image style for media browser in node edit form?" one response noted that "Once you have chosen the image and clicked save and the overlay is closed, images are ...
mastoll's user avatar
  • 73
2 votes
0 answers
2k views

Preprocess function for an image

I'm trying to add custom class to an image. The image is generated with a image field called "field_hero" so i'm trying to add a class to this image that is generated from that specific field. Right ...
Gustav's user avatar
  • 51
2 votes
3 answers
399 views

Hide default value by view mode

I have an image field inside the content type 'Article'. I have two view mode: "teaser" and "full". I have a view page ('Homepage') showing all 'Article' nodes using "teaser" view mode. In the '...
Andrea Moraglia's user avatar
2 votes
1 answer
1k views

How do I integrate media (e.g. attaching audio) to nodes?

I installed the Media Entity module for Drupal 8. I thought it would somehow facilitate adding Mp3, etc, as Media does in Drupal 7, where I could specify a media player type for an audio file. (And ...
Brian Huether's user avatar

1
2 3 4 5
17