Stack Exchange Network

Stack Exchange network consists of 174 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.

-2
votes
0answers
23 views

Moving images to another location when entity update

I have an image field in my content type and when I upload image it will save to a location as expected. Now I want to move that saved image to another location when entity inserting or updating ...
0
votes
0answers
13 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
29 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
46 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
34 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
42 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
52 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
611 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
26 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
20 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
0answers
37 views

Set an image as an image style programatically

We are trying to import a 18,000 image from an antiquated Alfresco system into Drupal 8. The old system already created cropped versions of the original assets that need to be kept and used in news ...
0
votes
1answer
38 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
22 views

Image style not generated in amazon s3

I have images store in amazon s3. When I upload image in Custom image style it not generated . But when I upload image in default files folder it generated. So, Can anyone help to what is the problem ...
0
votes
0answers
71 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 ...
0
votes
0answers
20 views

Image Style Generated Image Expiring?

I'm using custom image styles inside of Drupal 8 for the first time (I've always just forced admin users to upload various image sizes) - but for ease of use for admins I've incorporated that feature ...
1
vote
1answer
53 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
32 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
41 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
35 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
34 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
18 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
120 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
42 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
34 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
41 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
29 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
61 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
46 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 ...
0
votes
1answer
56 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
0answers
59 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
226 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
60 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: ...
1
vote
1answer
121 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
107 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 ...
0
votes
0answers
73 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 ...
0
votes
1answer
122 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
214 views

CKEditor Image Button: Cannot insert images in body of a basic page - “Image field is required”

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
88 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
107 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
28 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
27 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.
-2
votes
2answers
75 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 ...
0
votes
1answer
20 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 ...
0
votes
0answers
10 views

Thumbnails of images aren't generated in the News Node

I'm new to Drupal and I'm currently working on a page where there's a News Node. This asks for the Title, Image and the content. When I try to upload an image, Drupal should generate two different ...
-1
votes
1answer
139 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 ...
0
votes
0answers
33 views

Node field watermark image effect on another node field image

I have installed the drupal 8 image effects module and I've made a copy of the ImageEffect WatermarkImageEffect plugin in my custom module. As with all the image effects you've got the constructor, ...
0
votes
0answers
104 views

Drupal 7 AJAX not working on entire site

Images upload, Views Submit (Ex. Global: Text area, edit fields in Views) are not working in my Drupal 7 website. Here is the access log I found from Apache; 127.0.0.1 - - [19/Jul/2018:12:46:51 +...