Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [plugin-imager]

Questions related to the Imager plugin for Craft.

Filter by
Sorted by
Tagged with
2
votes
1answer
21 views

Pass aspect ratio as variable into imager

I use imager to transform images and I want to pass the image ratio as a variable: {% set customRatio = 1/1 %} {% set image = craft.assets().one() %} {% set transformedImage = craft.imager....
1
vote
1answer
51 views

switch / rotate images based on device orientation (landscape / portrait)

I have the feeling I'm the only one with such complicated code for my images. With so many devices with different view ports and landscape / portrait... How do you all handle your picture tag art-...
0
votes
0answers
23 views

Disabling Imager's 'auto' transform, only returning transforms if they exist

We have a situation where we to use Imager with a very very long cache duration for transforms, but we never want to carry out Imager transforms as the result of front-end activity (Thousands of ...
1
vote
1answer
32 views

Imager - connection refused error

All assets on my website work properly, however I cannot resolve an issue with Imager plugin on a single page template. My template: {% set profileImage = entry.user.photoUrl('original') %} {...
1
vote
1answer
66 views

Imager plugin for watermarks

First time using the Imager plugin and really unsure how to code it. Looking over the documentation I'm not clear on what the 'logo' is referring to to know what to change it to: { watermark: { image:...
0
votes
0answers
56 views

Imager - HTTP status “401” error while generating transform

When I uploaded the website to a new server, some transforms don't generate and throw an exception instead: HTTP status “401” encountered while attempting to download “https://domain.com/web/uploads/...
1
vote
1answer
68 views

Assets are not loading anymore (maybe an update)

I just noticed that I can't see my files if I go into the assets section. An Error blinks up and says "An unknown error occurred". In the front-end, I see every file and I can upload files to an asset ...
1
vote
1answer
225 views

Assets page “An unknown error occurred”

I'm suddenly unable to load my site's assets page. All of my asset sources are local, and loading the main assets page or any source folder or subfolder results in "An unknown error occurred." being ...
1
vote
1answer
132 views

Imager Transforms, Cacheing and S3

Got Imager running great on my S3 hosted images. However it's cacheing transforms locally on my server. I'd like to save some disc space and have the transforms on S3 too, but struggling to get my ...
2
votes
1answer
238 views

Element API, VueJs and Imager!

I'm trying to do something akin to Andrew's excellent article whereby I have a 'more' button that spits out 6 more entries at a time. I'm nearly there, but running into some issues. I don't get past ...
0
votes
2answers
257 views

Use Imager plugin with Element API?

I'm trying to use the Imager-Craft plugin to make specific image transformations, but cannot figure out how to access Imager within the element-api.php file. Imager shows plenty of template examples, ...
2
votes
2answers
46 views

Apply imageTransform on twitter media feed

{% set response = craft.twitter.get('statuses/user_timeline', { tweet_mode:'extended', count: 20 }) %} {% if response.success %} {% for tweet in response.data %} {% ...
1
vote
1answer
193 views

Output assets within a matrix block using Imager and Craft 3

I'm having trouble trying to output assets from an Assets field that's within a Matrix block, using Imager. The code below is only outputting the first image that has been added, over and over for ...
2
votes
1answer
210 views

How to make PNGs crisp using Imager + Optipng and Craft 3?

I've installed Imager in a Craft 3 site and everything looks fine except my PNGs are fuzzy. I've set 'pngCompressionLevel' => 0, because I'm using Optipng and the docs say to do this. The PNGs have ...
1
vote
1answer
610 views

responsive image and srcset with Imager

Have read this article, but still having issues. Craft 3.0.4 Imager 2.0.0 My template code is: {% set image = block.image.one() %} {% set focalPoint = image.focalPoint | default("50% 50%") %} {# ...
1
vote
1answer
144 views

Eager load Imager transforms in Craft Commerce

I am using Imager to create my image transforms. I am on a category page and I want to list all of the products. I did a quick .with(['cf_shop_assets']) optimization and wanted to continue with the ...
1
vote
1answer
246 views

“A non-numeric value encountered” reintroduced after version 2.6.2991

It seems that an issue that was solved in craftcms 2.6.2991 is reintroduced afterwards. I have just updated a site to version 2.6.2997 and the exactly the same error that was there prior to version 2....
2
votes
2answers
69 views

Use Imager plugin with AssetTransforms defined in admin panel

I'm trying to use the Imager plugin with some asset transforms that I've defined in the admin panel. Passing the name of the transform is just tossing an error at me. Is there a way to do this, or ...
0
votes
0answers
81 views

Imager Effects not working

Usually the effects work fine for me, are there are server requirements to get them working that I have missed? or is the template code below incorrect? {% for block in entry.clientLogos %} {% ...
2
votes
2answers
144 views

Setting Imager crop position dynamically

I have a simple dropdown attached to each asset that allows the user to select the desired crop position (in %, so '0% 0%' , '0% 50%' , and so on). In my twig template I have this inside a for loop ...
1
vote
1answer
375 views

How do I add a new item or object to an existing object?

I'm using the Imager plugin and Craft for image compression. Currently, I have something like this: {% set imagerConfig = { jpegQuality: 80, pngCompressionLevel: 4 } %} In another part of my ...
1
vote
1answer
55 views

Can't seem to output fields related to the current category page

I'm struggling to output images and other fields that are related to the current category page. So {{ entry.title }} is outputting as expected, and displays the title of the related items to that ...
1
vote
1answer
420 views

responsive sizes with imager plugin

I’m trying to setup responsive images with the imager plugin, that has 100% width on mobile sizes and then the images are in a 3 column grid on tablet and desktop. But although I’ve got the code ...
2
votes
1answer
274 views

loop through responsive images in matrix with imager plugin

I have a content block in a matrix field where I'm trying to output a loop of three sub images. I can get it to work using the following code: {% case "secondaryImage" %} <div class="container"&...
1
vote
1answer
312 views

Matrix gallery with Imager plugin

I have a portfolio page for a client that has a simple two column grid of images. However, I'd like to set it up so that it creates responsive images via the excellent Imager plugin. I have the ...
0
votes
0answers
92 views

Imager plugin not working inside the loop

so I am using trying to use the Imager plugin to compress my images. It works fine this way: {% set imagePath = "/path/to/img.jpg" %} {% set compressed = craft.imager.transformImage(imagePath,...
1
vote
1answer
164 views

Trying to set an image URL using a global asset field

I've setup a global asset field so that a client can change a placeholder image that gets used throughout their website. I'm using the Imager plugin for my image transforms. The following image code ...
1
vote
1answer
126 views

How to darken an image using the Imager plugin

I'd like to 'darken' an image using the Imager plugin. How would I go about doing this? I'll explain the exact effect I'm after in Photoshop terms: I have an image on one layer, then I create a new ...
1
vote
1answer
211 views

Imager resized image not shown (404)

I'm just trying out the imager plugin. It looks promising! I've set up the first usage example but I don't see any image on my site in the browser. The image is uploaded properly to the asset source ...
2
votes
1answer
398 views

Preparse responsive images

I'm trying to get Preparse Field for Craft to work on some responsive images set up with Imager for Craft, but I'm not having much luck, as it's still only generating the cached images on page load ...
1
vote
2answers
96 views

Imager plugin doesn't generate images in multi-language website

I upgraded a website from a single to multi-locale site and found out that the images (generated with the Imager plug-in) won't load in the new locale; I get a 404 for every image that the browser ...
2
votes
2answers
357 views

Using Focuspoint with eager loading

I'm using eager loading for retrieving some images for my gallery: {% set employments = craft.entries({ section: 'employments', with: ['photo] }) %} This works fine and I can see all images on my ...
1
vote
1answer
298 views

Image(r) transform and for loop

I'm stuck with the .first() element and why the for-loop code won't work. <div id="header-slider"> <ul> {% set image = entry.bannerSlider.first() %} {% set ...
1
vote
0answers
278 views

Responsive images using Imager when original asset isn't large enough

Anyone here using the Imager plugin and creating responsive images using srcset and sizes? Any ideas on how to avoid creating multiple versions of the same image if the original asset uploaded is ...
0
votes
1answer
133 views

Imager plugin using it's transformImage method doesn't produce correctly resized images

I'm using the lovely "Imager" plugin to produce a srcset of images, however it seems to only produce one size of image, which isn't really what i was expecting! My code is: {% set image = entry....
3
votes
1answer
543 views

How to suppress server errors in Craft?

On certain pages of my site, I download and display resized (using the Imager plugin) images from remote site. Now, sometimes that remote site returns error and in such case Imager is throwing ...