The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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.

812 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
847 views

When I POST an image file via rest, response is 201: Object Moved, status is temporary

I'm attempting to POST images to Drupal 8 via the REST api. The creation is successful (201) and the images appear in the files list. However, there are problems. I'm not sure if they are ...
4
votes
0answers
296 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 ...
4
votes
2answers
3k views

Using Media, views, and colorbox to create a 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 ...
4
votes
2answers
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, ...
4
votes
3answers
827 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 ...
4
votes
1answer
676 views

Image field upload shows a broken preview until I reload the page

When I upload an image it does an AJAX upload and then tries to show the thumbnail but the thumbnail style of that image is not available, so it shows up as a missing image. If I save and come back to ...
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 ...
3
votes
0answers
236 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 ...
3
votes
1answer
1k views

How can I allow users to specify image dimensions in CKEditor

I have a use case where content editors have a requirement to specify the height and the width of an image in the image properties. Sticking to styles is not possible because $reasons. The CKEditor ...
3
votes
0answers
1k 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 ...
3
votes
1answer
648 views

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 ...
3
votes
0answers
464 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 ...
3
votes
0answers
263 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 ...
3
votes
1answer
294 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 ...
3
votes
2answers
854 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 (...
3
votes
1answer
273 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 ...
3
votes
2answers
611 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 ...
3
votes
0answers
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 ...
3
votes
1answer
396 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?...
3
votes
1answer
284 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 ...
3
votes
2answers
451 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 ...
3
votes
1answer
453 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 ...
3
votes
1answer
442 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 ...
2
votes
0answers
356 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. ...
2
votes
0answers
372 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 ...
2
votes
1answer
511 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 ...
2
votes
0answers
268 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 /...
2
votes
1answer
374 views

How to execute ajax action after image file upload with media widget?

I want to prepopulate some node fields with image metadata (using the EXIF module) right after an image is uploaded/inserted in a node image field with media browser widget and before the node is ...
2
votes
0answers
115 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 ...
2
votes
1answer
384 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.
2
votes
1answer
60 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 ...
2
votes
1answer
168 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 ...
2
votes
0answers
55 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 ...
2
votes
1answer
600 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 ...
2
votes
1answer
2k views

How to rename uploaded files

Using Drupal 8, I want to rename and clean all filenames, e.g. If someone uploads file named like this Screen Shot 2016-03-29 at 1.13.21 PM.jpg, I want to clean it so that convert all spaces to dashes ...
2
votes
0answers
766 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 ...
2
votes
2answers
322 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 '...
2
votes
1answer
849 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 ...
2
votes
0answers
762 views

Add media in CKeditor and image styles

The above screen shot is from Add media button in the CKeditor of drupal article content, and after selecting an image from the library. What I need to see in this window is a list of drupal's image ...
2
votes
1answer
35 views

Image uploading issue

I have uploaded the drupal website on one of my domain and it is working well, then now I need to migrate it to another domain. Every thing was migrated but when I try to upload images from admin ...
2
votes
0answers
58 views

How to specify media formatter on /media/[id] page?

I have Media 2.x installed and every file (since they're entities) has its own page accessible via /media/[id]. I can't figure out how to set a formatter for displaying the media there. It always ...
2
votes
3answers
319 views

Generate 1D bar code based on user defined input

My requirement is to generate 1D bar code based on user defined input in the text box. for example if user give 10 as input in the text box then he should able to generate 10 bar code with different ...
2
votes
1answer
110 views

How handle large number of images in gallery node Drupal 7

I have some gallery nodes with a large number of images (100+), the upload with Plupload integration module works fine, but after save the node and edit it again the node edit form loads 20+ seconds! ...
2
votes
0answers
42 views

Intregrating Media-7.x-1.5 Module in CKEditor 4.4.3 (7.x-1.16) with Picture Module

I am not able to upload image with picture tag inside CKEditor.When i upload image,media automatically defaults it to mobile image(lowest in the picture mapping) in the picture group without showing ...
2
votes
1answer
65 views

How to apply an image style based on a condition?

I've been following this discussion: How to apply an image style based on a condition (a date for ex.)? but unfortunately it has not been a success. I would like to have the image to change based on ...
2
votes
1answer
116 views

How to export user's content via features to new site in Drupal 7

Can anyone tell me how to export contents of users through some contributed modules?? like features,because I have a site which has 100 users,all contents are migrating through features but user's ...
2
votes
2answers
27 views

How to provide link to styled image in a services feed

On our Drupal 7 site, we use the the services module to provide a feed for our internal news to pick up. With services, you create a view for all the data to provide. It is current giving the location ...
2
votes
0answers
53 views

How to disable image title tags in scald MEE / Drag'n'Drop text field

I would need to disable the rendering of image title tags. Is there a way to do this 'native'? Or is there any other way of doing this?
2
votes
0answers
59 views

“managed_file” type element not showing in my custom block configure form

I have been creating a portfolio section for my one page theme and I created a module for these section blocks. Now, I'm using the hook_block_configure to set the data into the blocks. Only 1 "#...
2
votes
1answer
45 views

image field point to another image field

I have users whom are part of a group, this group has an image field that can be changed by the administrator. When a user writes a new article, i wan the article to display the image of the group. ...