We changed our privacy policy. Read more.

Questions tagged [image]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
30 views

Generating srcset in a similar way to WordPress

I come from a WordPress background, so I'm attempting to create responsive images the way I'm accustomed to with WordPress. Perhaps that's the wrong approach, I'm not sure. In WordPress I would ...
1
vote
1answer
17 views

Creating a channel (or entries) using a similar channel

I am currently trying to make a channel called "classmates" similar to a channel that is called "News". I have this working beautifully, but I am not sure how to set a different ...
1
vote
1answer
16 views

Getting all images urls and help with numbers field

I have two problems with CraftCMS :( First one - I want to make images gallery and now using something like this: {% set image = entry.car_photos[0] %} {% if image %}<div class="...
1
vote
1answer
88 views

Using NextJS image component with CraftCMS

NextJS has a really nice image component. To implement this I need to create a custom serialiser to get the image sizes from Craft . I can define a custom loader, however I'm not sure how feasible ...
1
vote
1answer
44 views

Server down (timeout) when optimize bundle of image (Image Optimize Plugin)

I try to use the Image Optimize plugin to optimize the image with default Craft Transform. There are lots of images to be optimized at the same time, I keep having the issue of server down. Here is ...
0
votes
0answers
12 views

When Asset is Located in Root of Asset Volume - asset.getPath() Does Not Return the Volume as Part of the File Path

Context Asset Volume: staff (I'm using an S3 bucket as the source type) Image location: staff/john-smith.jpg Version: Craft 2.7.8 Results I expected that this query {{ staff.portrait[0].getPath() }} ...
0
votes
0answers
23 views

Image thumnail not found(404) issue. What causes the header to set as image/svg+xml instead of png/jpeg?

Thumbnails not loading in assets list in my control panel with my host platform.sh(works in my local docker env). Call to index.php?p=admin/actions/assets/thumb&uid=29dad26b-ba90-4b26-b9fb-...
1
vote
1answer
37 views

Import local image with FeedMe assumes wrong folderId

I am importing Entries from Google Spreadsheets and I have a column in my spreadsheet containing the filename of an image already existing in Craft. The import itself works, but images are not found / ...
0
votes
0answers
26 views

Hide users photo (avatar) from admin panel grid

Is it possible to remove the field for users' photo from the grid of the tab Users? It also appears on the user's profile page. Examples Grid: User's profile page:
1
vote
1answer
25 views

'png_compression_level should be an integer from 0 to 9' upon uploading image

First time we see this: client tried to upload a specific PNG file (that a first sight looks ok) and Craft CMS returned the error 'png_compression_level should be an integer from 0 to 9'
1
vote
1answer
19 views

Stop image upload if moderation fails using EVENT_BEFORE_HANDLE_FILE

I have a frontend form where images can be uploaded. I am handling the image moderation within EVENT_BEFORE_HANDLE_FILE on the Asset class. I am setting session errors for any moderation issues ...
1
vote
2answers
54 views

{{ entry.image.first().url }} won't show image

I am on my first Craft CMS test site. Have some problems showing a simple image. <img src="{{ entry.hero.first().url }}" title="{{ hero.title }}"> I get the title but can't ...
1
vote
1answer
33 views

Asset file permissions issue hyperlane

I am having trouble setting up image volumes correctly in Hyperlane. My best guess is that is has something to do with permissions but I have not been able to find a solution. This is how I have set ...
1
vote
1answer
48 views

Is there a way to add custom aspect ratios in the image editor?

We'd like to add a custom aspect ratio to the list of aspect aspect ratios in the image editor so our client doesn't have to look it up to remember each time. Is this possible?
0
votes
0answers
35 views

Craft CMS image src error

Good morning, I have inherited a Craft CMS site from a previous developer, and am running into issues when looking to add images to the site. Following instructions I grabbed the copy of the SQL ...
1
vote
1answer
1k views

Uploading Lottie animation files with images

For anyone who doesn't know what Lottie is, it is a video player created by the AirBnB team that lets you play vector animation exported from Adobe After Effects. It exports as json-files that you can ...
0
votes
0answers
26 views

Non-destructive image cropping plug-in

I am looking for a user-friendly, non-destructive way define an image crop when editing an entry with an asset field. Should be able to visually define an image crop Should be able to change the crop ...
0
votes
0answers
76 views

404 Error for assets where "Base URL" and "File system path" are different

I am new to Craft 3 and I have seen similar questions asked many but never answered. I want to store my images in a directory that is not public, yet I want them to be served correctly by Craft. The ...
0
votes
0answers
50 views

Apply image transform after image is placed on page

I have an overview (i.e. list with around 150 items). Each of those items has an appropriate "teaser image". When a user is hovering a list item the appropriate teaser image fades in, on mouse out it ...
1
vote
1answer
73 views

how to output all images in an entry's loop

Unfortunately I'm still very new to Craft, but I have a question to which I haven't found an answer here or in the Docs or the ones I found don't seem to work in my case. I want to output all the ...
0
votes
0answers
28 views

Images won‘t display in an entry loop

Unfortunately I'm still very new to Craft, but I have a question to which I haven't found an answer here or in the Docs or the ones I found don't seem to work: Why doesn't this entry-loop output a ...
1
vote
1answer
202 views

How do you output the Image Caption on an asset?

When you double-click an asset you can set the Image Caption: How do you structure the query to output this Image Caption "field?"
1
vote
2answers
189 views

Thumbnails broken in CP after migrating images to AWS S3

I migrated my images over to AWS S3 using the Amazon S3 plugin; however, now I'm seeing that the thumbnails in the CP are broken, and a brokenimage is displayed. The full size images display fine in ...
2
votes
1answer
271 views

How do I add Alt Image Tags to my photos?

I am trying to figure out how to add alt image tags to my photos. I was under the impression that the "file name" served as the alt image tag in Craft CMS, but no such alt tags are populating...and ...
4
votes
1answer
180 views

Craft 3 Image quality is terrible after asset upload from admin panel

After I upload an asset (png), the image loses quality. I changed the defaultImageQuality from its default value of 82 to 100 but didn't make a difference. I can't add these assets via FTP as I need ...
1
vote
1answer
217 views

Images not showing on the site

Our website has been live for more than a year with no issues, but today it seems the images have disappeared and are showing as a '?' Any ideas why this might be?
0
votes
0answers
23 views

Craft 3 Image doesn't change after save when editing from matrix

when I edit an image in the image matrix block and save the asset, the changes doesn't affect the image thumbnail preview. The thumbnail preview changes only If I save the page. Video of the issue. ...
1
vote
1answer
279 views

'Unable to find component class 'FocusPoint_FocusPoint' - Craft CMS 3 Migrating from Focus Point Fields

I am migrating from Craft 2 to Craft 3 where images have Focus Point fields. I've followed Dan Hoerr's FocalPoint Migration (migration guide) And the php migrate script seems to have run successfully,...
0
votes
0answers
294 views

Assets uploaded image quality is terrible

When I upload a JPG image through Assets, the image quality is terrible. I dont mean a slight difference for web optimisation, but I mean REALLY bad! See screenshot. Can't find any helpful about ...
1
vote
1answer
152 views

Custom Clickable Image

I've been using Craft CMS for a while, but haven't seen any way to get the following done: Looking to create a page with a large image on it. The image would be overlayed with buttons that pop-out a ...
1
vote
1answer
50 views

Is there a way to reset the focal point in Craft?

As the question states. Is it possible to reset the focal point in the CMS? I cannot see any obvious setting? If not could this perhaps be a feature request for a reset focal point button?
1
vote
1answer
93 views

Select Transform Feature with Asset Field

If you insert an image in a Rich Text field you get an option to apply a transform, but that is not true when using an Asset field to choose an image, which seems strange. Is there any way to ...
1
vote
1answer
108 views

Sideloading an image from a function in a plugin

I need to be able to side load an image and attach to an entry. My image is coming from an external url... such as http://someplace.com/image.jpg - i can store this in a temporary file so its locally ...
1
vote
1answer
155 views

How can I fix Image Exception error when uploading image via front-end form while Preparse plugin enabled?

I'm not sure if the issue is with Craft 3, the Preparse plugin, or me, so I'm posting here first. I have a front-end form that includes an Assets field used to upload images. The entry type contains ...
1
vote
1answer
148 views

Update field setting value using getFieldByHandle

I need to update the limit setting for Images allowed to be empty, so as to allow for no limit. How do I go about updating the 'limit' setting? $fieldsService = Craft::$app->getFields(); $field = $...
1
vote
1answer
767 views

Is there a way to allow users to control alignment of images in the Redactor plugin using Craft 3

I'm looking to let editors determine the alignment of images in a Redactor field. I wasn't sure if it worked out of the box with Craft 3 (I'm using 3.0.9). I did find this plugin: https://github....
2
votes
1answer
321 views

Focal point: more control?

I originally had this setting in twig for gallery thumbnails: {% set square150 = { mode: 'crop', width: 150, height: 150, quality: 75 position: 'center-center' } %} <img width=...
2
votes
1answer
655 views

Eager loading on entry not reducing queries

Using this snippet returns me 38 queries on my homepage without the Eager Beaver plugin. {% do craft.app.elements.eagerLoadElements( className(entry), [entry], ['headerImage', 'image1', '...
1
vote
0answers
46 views

Redactor image default filter

Is it possible to define a default filter for an image inserted in Redactor text ? Filter twig for front or config ? Thanks
1
vote
1answer
88 views

Is there any way to replace the asset programatically?

In the CP, when we upload an image with a same name, craft will ask if we wanna keep both or replace. So in plugin, is there any way to do the replace?
2
votes
1answer
199 views

Problem pulling Tweets with media using Dukt's Twitter API plugin

{% set tweets = craft.twitter.get('statuses/user_timeline', { tweet_mode:'extended' }) %} {% for tweet in tweets %} <li> {% if tweet.extended_entities.media is defined %} {% ...
1
vote
1answer
31 views

How to create a border + border colour field on an image

My first question here... maybe one of a few! I've inherited a Craft project recently and don't have much experience with it. I want to allow admin to set a border (and border color) whenever they ...
1
vote
1answer
125 views

How to display a featured image in the list of entries

I created a field which uploads an image, and I want it to display it for each of my entries inside my for loop. What's the code I should use to do it?
1
vote
1answer
497 views

Commerce PDF error: Image not found or type unknown

In the order template, this error shows up in the generated PDFs when adding standard JPG images. We're running Commerce 1.2.x on PHP70. It could be related to this dompdf issue, but how do we fix ...
1
vote
3answers
194 views

Flip PDF embed inside templates

I have some 'Flip PDF' generated folders that I need only logged in users to be able to access. If I put them in templates I get the problem that the .jpg images 500. Is there a way of allowing .jpg ...
1
vote
1answer
332 views

Image quality get low in Craft 3 after applying image transform

As of now I am using Craft's image transform to render images according to the size. If this still appears low quality even Image Transform setting with qulity "Maximum".
1
vote
2answers
205 views

How can I get the image picker on the WYSIWYG editor?

I am running on the latest version of Craft (Craft CMS 2.6.3015). I have a blog entry, which has a Rich Text editor for the body field. However, I do not have an image or file upload field in the ...
1
vote
1answer
528 views

block.image.one() shows more than one image

I'm sure I'm doing something wrong here, but I'm at a loss as to what. I'm using Craft 3. My travel entry has 7 fields, one of those being a matrix field. My matrix has two blocks, postText and ...
0
votes
1answer
145 views

Serialization of 'Closure' is not allowed when upload image [duplicate]

I built up a form at the frontend to allow users to upload their avatars,my code looks like below <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} ...
1
vote
1answer
46 views

Random transforms

We are using a masonry grid, with 3 image sizes (different heights). The images are (one of) the banner image(s) from the news entries. We played around with this, however this doesn't work as we need ...