Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [images]

Use it for Drupal-specific questions, not to ask how to convert images between different formats.

1
vote
1answer
21 views

How to use articles attached images as background of a div

I'm doing my first site on Drupal 8 and I have a problem. I would like you to help me. In fact I'm trying to get the articles attached images as a background for a div created in the page templates. ...
0
votes
1answer
28 views

Output image src via JSON

I have worked out how to use dynamic routing and JsonResponse() in a custom controller to output pure JSON, with no HTML at all. I would like to do the same with an image — for the page to output an ...
0
votes
0answers
19 views

Image alt tag not saving on save/edit

I have a content type for gallery photos which has a Image data type. When I create the content type Drupal ignores the alternate text I enter for any uploaded image. When I edit the content type ...
1
vote
1answer
94 views

Unable to access private file?

I had this issue before, and last time the problem was that node was unpublished. The private file became accessible when the node was published. This time, however, I'm not using a node. I'm just ...
-1
votes
0answers
23 views

Any way to provide a UI to blur only a part of images?

Users can upload photos (using the core Media module). Is there some way to provide a UI to allow users to selectively blur parts of the image upon uploading? Example: User uploads a chat screenshot,...
-1
votes
2answers
38 views

How do I programmatically get the URL of an entity referenced media image field using on a custom_preprocess_html() hook on THEME.theme?

Reason: I need to create an Open graph meta tag og:image and pass the URL as content. On THEME_preprocess_html(), I loaded the node using $node = \Drupal::routeMatch()->getParameter('node'); if (...
0
votes
0answers
15 views

How to upgrade a site that uses node_gallery for galleries and images?

I have a Drupal 7 site that uses node_gallery to publish several image galleries. This has been working well for several years. I'm looking at upgrading that site to run on Drupal 8 instead. ...
0
votes
0answers
11 views

Update programmatically (js) the images of a image field in edit form

I have an entity type which has an image field. I use the default form widget for this, and I can upload or delete the image. On the node edit form, I have also a pop-up widget with a javascript app ...
0
votes
0answers
49 views

Drupal not generate image style for .png

On node edition when i upload new image, like in basic page, all is working with .jpg and .jpeg picture but not with .png. When i upload a new image, the style is well created in 'sites/default/...
0
votes
1answer
30 views

How do I add a customized parameter to image links

Lets say I have image fields in my node. When I get that fields values in the twig it returns the image URL without any issue. file_url(node.field_image.entity.uri.value) But now I want to add a ...
0
votes
1answer
35 views

Twig error “Uknown image_style filter”, but the filter isn't missing

I'm migrating a site to a new host. On the front end, I see... Twig_Error_Syntax: Unknown "image_style" filter. in Twig_ExpressionParser->getFilterNodeClass() (line 57 of /var/www/prod/web/themes/...
0
votes
1answer
28 views

Applying image style breaks image src

I have added simple blogging functionality to my Drupal Site using a custom content type named Blog that I created. One of the fields in Blog content type is a image field. Inorder to display a list ...
0
votes
1answer
32 views

Howdo I display all the images from a field in a view?

I'm trying to display multiple images from an image field in one view as an Owl Carousel, but I only see a maximum of 5 images to be displayed there. Googleing it, I found that there's an option ALL, ...
0
votes
0answers
10 views

Removing images from node gives Cannot be modified error

I am using the latest drupal 7 version 7.64 and using multi plupload module for uploading images with drupal's bundled image field. The problem occurs when I try to remove an image then try to save, ...
0
votes
0answers
18 views

Access image field URL in a custom block [duplicate]

I need to have an easily exposed to user background image in an aera (header). So i made a custom block with an image field and i want to use this picture in a classical <div style="background.... ...
1
vote
0answers
25 views

Alternative methods to creating Image Derivatives

I am importing many many images (300,000+). This number includes adding different crops for each image. I might be wrong, but it seems that to get Drupal to know that a crop style has been set, I ...
0
votes
1answer
50 views

How can I upload an image for a specific image style?

I'm trying to support retina on my site, so I set up a 2x image style and a 2x responsive image style. Now the generated HTML for images looks something like: <img srcset="/sites/default/files/...
-1
votes
2answers
35 views

Dynamic image style?

I need to display profile image, but less blurred each day for example: day 1 : blur 30 day 2 : blur 20 day 3 : blur 10 Image style seems not to be dynamic. And I didn't find a way to do this. ...
0
votes
0answers
41 views

Unable to generate derived image located at public://

I am trying to use a slideshow on my server and I get this error Date Monday, January 28, 2019 - 18:28 User Anonymous (not verified) Location http://mysite.dev.local/sites/default/files/...
1
vote
0answers
103 views

Is anyone working with webp images? [closed]

I'm working on a Drupal 7 site with a prominent flexslider paragraph rotating images. The image files sizes appear to improve quite a bit if I convert them to .webp format. My problem is that I ...
0
votes
1answer
83 views

Scaling image using Imagick Module

i'm currently using the Imagick module for Drupal 8 and the imagick php extension on the server. Whenever I try to resize images with this tool, using the settings below, I get a really down sampled ...
0
votes
1answer
42 views

How to send mail with multiple images from node using Rules module? [closed]

$language = field_language('node', $node, 'YOUR _FIELD_NAME'); foreach($node->YOUR_FIELD_NAME[$language] as $file) { echo drupal_realpath(file_load($file['fid'])->uri); } I used this code to ...
0
votes
0answers
16 views

Requires Hard refresh of the page to get back broken Images?

When I upload images through media, the image thumbnails on the listing page only appears after hard refresh. Wherever Drupal image style is applied in any page, those page requires hard refresh to ...
0
votes
1answer
199 views

Programmatically update alt tag on image field

I have a Drupal 8 site with a content type that has an image field. For existing nodes of this type, most have image files, but none have alt tags. I am writing an update hook where I want to set ...
0
votes
2answers
50 views

How to create a sponsors logo block?

I have some experience with Drupal 7, but not that much. Now I'm working on my first Drupal 8 website and stumbled over the following situation: In a first iteration, the website should use the ...
0
votes
0answers
42 views

How do I return an image from code?

I'm converting some old Drupal 6 code. Some template files for custom content types use code similar to the following. if (some_parameter) { header(/* Set the MIME type for the image type */); ...
1
vote
1answer
96 views

Is it possible to add template suggestions for image styles?

I am experimenting with durpal 8 theme hook suggestions. I tried to customize the the theme suggestions based on the style name. I want the ability to add a twig template for each style if I wanted so ...
0
votes
1answer
151 views

How do I automatically generate image styles? [duplicate]

How do I automatically generate different image styles in Drupal 8, for existing images? For example, I have about 10K images in field_image field. I would like to generate thumbnails using my ...
3
votes
2answers
832 views

Create styled image programmatically

I have a module that create custom PDF with multiple selected nodes and I use the below function to create the link to styled images: $file = File::load($img_id); $imagesPath[] = ImageStyle::load('...
0
votes
1answer
48 views

Facebook does not use article image

We installed the metatag module, and we activated all metatag entries on the modules administration page. On the module settings we selected content type Node:article and went to Open Graph. We edited ...
0
votes
1answer
30 views

How to add title of the image in manage display section or display it in node view page

I want to display title property of an image in node view page. How can I display title of an image along with image in node page?
0
votes
1answer
81 views

create new image style using javascript

I am using fancybox JS library for creating a slideshow from a custom bloc with a multivalue image field. it works but the images on the slideshow are small because a style have been applied to the ...
-1
votes
1answer
30 views

Image style not generated for specific content type in amazon s3

I have store images in amazon s3 using s3fs module when I upload image in default drupal files folder it generated. But When I upload image in Custom image style it not store in custom image style ...
0
votes
0answers
245 views

How to add image field in a custom module form?

In our custom module, mymodule we have a form MyModuleForm where we want to allow for an image to be uploaded or chosen from already uploaded images. Below is the MyModuleForm.php file, but cannot ...
1
vote
1answer
130 views

Different responsive image per breakpoint

I have the following scenario - the main page banner should have at any time 1 of 3 images displayed at a given viewport size. These images are art-directed, that is to say, that will differ in ...
0
votes
0answers
50 views

Rewrite the image markup from specific image field in Drupal 8 [duplicate]

Hi I want to rewrite the markup for a responsive image for a certain field: <img{{ attributes }} /> <img data-src="{{ attributes.src }}" data-srcset="{{ attributes.srcset }}" sizes="{{ ...
0
votes
1answer
44 views

Passing Image through hook

Background: Im working in Drupal 8 and I have a paragraph type that contains a title and an image and I am trying to pass it through the preprocessor hook so I can set it inside a html template. For ...
0
votes
0answers
39 views

How do I crop an image without cutting off parts?

I'm using Image Crop Widget (8.x-2.2) and Crop API (8.x-1.5). I'm trying to add "padding" to the cropping area so that I wouldn't have to cut my images at awkward places. In the above picture, I have ...
0
votes
1answer
69 views

Image upload: Failed to open output stream

I created a media entity browser and for the image upload widget i choose the DropzoneJS.The widget settings are in the image bellow, pretty standard. And regardless of image type (png, jpg, jpeg) ...
0
votes
2answers
28 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
25 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
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
16 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
236 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
85 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
40 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
48 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?
0
votes
1answer
35 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
0answers
73 views

How to upload profile picture directly from user-view

How can I allow users to update their profile-picture directly from the user view, without navigating specially to the edit-account page? Each user on site has a gallery of uploaded pictures. A ...
0
votes
1answer
77 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 ...