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).

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

Some images are not loaded - 404 not found

Some images on my Drupal site are not loading. In the folder sites/all/default/files and also in the folder sites/all/themes/mytheme/images some images are not loading. When I rename the file and ...
0
votes
1answer
50 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 ...
2
votes
1answer
420 views

Create form for image selection from the content

I have a content type with title and image field in it. Now, I want to show a form to the user which will show the image thumbnail, title and a checkbox below each image with the value of respective ...
2
votes
1answer
505 views

How to print and/or manipulate individual image attributes and suppress width and height via the image.html.twig template

I had to get rid of the width and height attributes in my images and wanted to learn better the possibilites of Twig in Drupal.
3
votes
2answers
452 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 ...
0
votes
2answers
824 views

Base path and user picture uploading

So I recently migrated my site between servers. I think this is causing some issue with the base path of Drupal, which in turn affects the image upload path when a user tries to upload an image to his/...
0
votes
4answers
609 views

How do you wrap an image with a link?

In Drupal 7 this was done with the l() command and setting the html option to true. I have found the Link::fromTextAndUrl() method in Drupal 8 but no mention of something similar to the html option. [...
0
votes
1answer
456 views

How do I insert a user picture's thumbnail on the “Submitted by” field?

I want to insert user picture's thumbnail on "Submitted by" field, which is displayed in teaser such as the following. Submitted by [some_user] [someuser picture's thumbnail] on xx/xx/xx How do I ...
1
vote
1answer
73 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 ...
0
votes
1answer
22 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. ...
0
votes
2answers
501 views

Limit the number of uploads per image field depending of role

I need a hook (or something similar) where I can set the number of image uploads depending of the role of the user. In the settings of the field there is no way to set the maximum number of values ...
5
votes
7answers
5k views

Image styles do not work

I am struggling to find a solution for image styles not getting generated. The original pictures get uploaded to the server but no styles or thumbnails are generated. I have checked folder ...
0
votes
0answers
479 views

Product images with thumbnails and preview [closed]

I would like to have image gallery with thumbnails and preview above for every product in my Drupal 7 site. What I need to achieve is for example here: http://cz.tp-link.com/products/details/?...
1
vote
3answers
654 views

How can I force HTTPS for all images?

I'm moving my Drupal 7 website to https but I keep having issues with some images that gets loaded with full path, but with http://. For example the site logo and view images have http:// path. (...
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
1answer
644 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
2answers
717 views

Dynamically changing the href on a link with data-dialog-type = modal does not work

For reference I am working on this issue for the Focal Point module... I have a link whose href is updated dynamically using js based on a particular user interaction (moving the focal point on an ...
0
votes
0answers
18 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 ...
9
votes
2answers
6k views

How do I remove the itok token from the image URLs?

How do I remove the itok token from the image URLs? I found an article discussing it, but it only works for Drupal 7 (https://www.drupal.org/node/1934498). Some articles explains why Drupal adds ...
1
vote
1answer
645 views

How to add image cache headers?

When doing SEO tests, we consistently seeing a message for cache headers on images. We were thinking of implementing but cannot find the appropriate way to test this as the x-cache still gives a MISS. ...
0
votes
1answer
712 views

Configure inline images upload path per content type

There is a core feature that lets you configure where to save inline images uploaded using CKEditor: Here you can specify the path where you want store inline images. But this is global ...
0
votes
2answers
379 views

Can I use plupload to load multiple image files into a single image field

I have an image file field on my Drupal 7 site that allows users to add 4 images. I would like to give my users the ability to load all 4 images at once. I have discovered the plupload module and ...
0
votes
2answers
819 views

One image style not generated

UPDATE: After investigting this I have concluded that the problem concerns ALL new image styles, but "old" ones are still working. Old ones are the built-in (e.g. thumbnail) and one image style of my ...
2
votes
1answer
639 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 ...
1
vote
1answer
853 views

How to add alt tag to image from views

I have created views with image gallery. Now I want to add alt tag to image how can I do it. I have not enabled alt field in content type configuration. I want add alt tag to already existing images. ...
0
votes
1answer
604 views

Show image on solr search result page

I want to show image in my solr search result page. For that, I have created one field in my content type called media. In db, Images are saving in field_data_field_media table in the form of ...
1
vote
1answer
455 views

I get a “URL not found” error, but the image is on the server

I have a Drupal site which I have just migrated to a different Linux server for development. The site seems to be working more or less. However, one problem persists: None of the images is shown. ...
0
votes
1answer
606 views

External URL Redirect Breaking Image Links

I was recently hired to manage an existing Drupal 7 site (built with an Omega subtheme) and am doing my best to ramp up quickly. Unfortunately, I do have some fires to put out immediately and could ...
1
vote
1answer
1k views

How do I delete files attached with media entity in drupal 8.4.2?

Background: drupal 8.4.2 custom media solution Issue I can not delete files permanently which created as media entity. Reproduce Created an image media entity. /admin/content/files claims status ...
0
votes
1answer
616 views

Manual crop not working in Chrome

Is anyone using manualcrop https://drupal.org/project/manualcrop? It works fine in Firefox but doesn't work in Chrome. Using Drupal 7. Thanks!
0
votes
1answer
517 views

Is it possible to change the _alt_ text wording for images in one place?

Is it possible to change the alt text wording for images in one place, as the wording used does not pass validation? The website contains a vast amount of pages, most of which with images having ...
1
vote
2answers
708 views

open image files in new tab in views

I'd like to open my image fields which are linked to file in new tab. In veiws I mean. I set the image field as: Rewrite the output of this field -> checked Output this field as a link -> checked &...
0
votes
1answer
382 views

“Image Upload Button” section remove after click on upload

I am trying to edit users's profile page in Drupal 7. I have an image upload button there, but it remove (hide) after click on upload button . But If i login with admin its working fine, means image ...
0
votes
2answers
465 views

Default user image in user account menu!

I am trying to add a default image to render in the user account menu when the user does not have an image. CODE: function nestle_preprocess_menu(&$variables) { if($variables['menu_name'] == "...
8
votes
4answers
19k views

Rendering an image field in page.html.twig with a custom image style

I'm trying to set up a slideshow that's unique to each page. The code for this needs to be in page.html.twig. I've got the slideshow mostly working, but I can only call the full image URL, not a ...
0
votes
2answers
925 views

visually resize images when uploaded inline in ckeditor

is there a way to resize images after uploaded in the inline ckeditor? if i have a big picture 2000x2000 and upload it (not via IMCE) to the editor, the image is huge and it is displayed in full size....
0
votes
2answers
595 views

Insert grid of images into about page

Im new to the forum Hope you are all well? I have a really simple thing I want to do with drupal but for the life of me I cant seem to get it right (I'm a beginner with drupal) So I have an about ...
1
vote
1answer
368 views

Uploaded file not shown in custom content type / Image not attached to content type

In Drupal 7, I am trying to upload an image that belongs to a custom type. I click the Browse button, choose the file and upload. Until there, all seems to work well. However, when I click next, ...
1
vote
1answer
598 views

How to change image size and position when uploading to article in tb_rave_starter

I want to change image size and position How could this be done, please help me.
1
vote
2answers
5k views

Get the uri/path value of an image in the field template

I have created a custom field template for an image - field--field_images.tpl.php with the following code: <?php $url = file_create_url($field_images['uri']); $url = parse_url($url); $imglink = ...
0
votes
1answer
911 views

Image styles with $settings['file_public_base_url']?

I deep dive in the settings.php file of Drupal 8.1 and try to configure $settings['file_public_base_url']and $settings['file_public_path']. All media links are correctly rewritten, that works with ...
1
vote
1answer
26 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. ...
1
vote
1answer
643 views

Creating nodes from json including image field upload

I am trying to create a node programmatically from the data(JSON) sent by my front-end template. <input id="title" name="title" type="text" > <input id="body" name="body" type="text"> <...
1
vote
1answer
658 views

How to trigger a rule if a node has a certain Taxonomy term?

I'm trying to create a rule using Rules that will apply a watermark to an image within a node (using the ImageCache Actions module) if that given node has a specific Taxonomy term. For example, nodes ...
1
vote
2answers
2k views

“File (Field) Paths” and “Media” modules: files not saved in the intended folder

I'm trying to use both the "Media" module (1.4) (to manage uploaded files) and the "File (Field) Paths" (to keep the uploaded files organized in various subfolders). Basically, I have a content type ...
1
vote
2answers
643 views

Hide Alt and Title for image field

How to hide Alt and Title fields for anonymus users when they upload images? I use tokens for these field that's why I need to hide them.
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 ...
3
votes
2answers
612 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 ...
0
votes
1answer
5k views

Best way to use image styles with Media and WYSIWYG?

Up to now, I've been using the Insert + WYSIWYG + CKEditor to insert images with specific Image Styles in a wysiwyg interface. This works well, and it's very easy to select and apply image styles (...
0
votes
2answers
810 views

Add cropping option to an image form

I've the next form. $form['imagen'] = array( '#title' => t('Image'), '#type' => 'managed_file', '#upload_validators' => array('file_validate_extensions' => array('...

1 2 3 4 5 53