People who code: we want your input. Take the Survey

Questions tagged [image-transforms]

Craft's native, non-destructive image manipulations.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Using NextJS's 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 and I can define a custom loader, however I'm not sure how feasible ...
1
vote
1answer
33 views

Image Transforms and AWS

I regularly use srcset to serve large images, such as heroes, and take advantage of Craft's image transform capabilities in the implementation, e.g. <img srcset="{{ image.getUrl('img500') }} ...
2
votes
3answers
41 views

TWIG dataUrl function for resized images

Craft provides the very nice TWIG function dataUrl(pathToImg) to inline images in e-mails. E.g. <img src="{{ dataUrl('@webroot/assets/img/logo.svg')" /> will base64 encode the image ...
0
votes
0answers
12 views

How to apply an Image Transform on output from plugin PDF Transform

In an attempt to autogenerate PDF Thumbnails I found this Plugin, PDF Transform. The plugin works fine, but I'm trying to figure out how to apply a Craft Image Transform to the results. I'll preface ...
0
votes
0answers
56 views

Trouble generating correct srcset sizes using getSrcset()

I'm trying to figure out the getSrcset() method, going by the docs here. When I try it using the code in that example (I modified to account for a Matrix field but other than that it is the code below)...
0
votes
0answers
37 views

WebP transform >> AssetTransformException: Failed to generate transform with id of X

I'm trying to transform some images on my site from JPG to WebP. However, I am having a problem to do so on my production site. I get this error: 2021-01-27 16:13:40 [-][-][-][error][craft\errors\...
0
votes
0answers
109 views

Image transforms not processing

Trying to use an image transform (tried in the template itself and in CP) but I'm getting "Image transform cannot be created." when I try to visit the transform url - the image doesn't load ...
1
vote
1answer
25 views

Does deleting an original asset but keeping the transform folder asset make Craft replace the original file with the biggest transform?

I have a client who has uploaded many giant images to the CMS (8mb+). I'd like to free up that space now that those image have been transformed to more web-friendly sizes. Is it safe for me to delete ...
2
votes
1answer
58 views

How to detect white background

In my product catalog, some product images need to have the css attribute object-fit: cover while some need the object-fit: contain: I'd like to detect the white background, possibly on upload (to ...
0
votes
0answers
24 views

Why do image Transformations never finish rendering regardless if I use GD2 or ImageMagick?

I'm running Craft 2 with PHP 5.6.40 on a Windows 2019 Server under IIS (x64, non-thread-safe, FastCGI). PHP -m doesn't show any issues with my extensions, regardless if I use GD2 or ImageMagick. But ...
1
vote
1answer
48 views

Image Transforms not generated - permission problem?

Since I installed my Craft based website on the production server the image transforms are no longer generated. The tasks runs through more than 5000 images but doesn't generate new ones. There have ...
1
vote
1answer
60 views

Generate transforms only working on default install (multi-site)

I have a multi-site setup running within Craft 3. Everything seems to be working nicely, except for image transforms. For example: The following transform on the default site works correctly: https://...
0
votes
1answer
51 views

Changing Image transforms for different media queries

Is it possible to set different image transforms for different media queries? I have a grid layout containing 1 large image and four smaller images on large screens. I have created two image ...
1
vote
1answer
38 views

How to reprocess image transforms that already exist in the database

If I import a Craft DB into my local db, and it has references to image transforms that existed in another environment, it won't recreate them in the filesystem when a page is loaded that asks for one ...
1
vote
2answers
94 views

Animated GIFs not working in Craft with ImageMagick installed

When I upload a GIF I either get the first frame or a garbled image (https://share.getcloudapp.com/L1u7BXrA). Looking around at similar questions, Craft needs ImageMagick installed to properly ...
1
vote
1answer
91 views

Forcing creation of all transformations for all assets

Regarding a similar question I only found the advice to delete a table in the database but because I don't like fiddling with the db very much I like to ask: Are there ways to force craft to generate ...
0
votes
0answers
278 views

Image Transform change causes 500 Internal Server Error

I had an image transform set on an entry that was working as expected. I updated the code, and it didn't work, so I reverted back to the old transform. It was literally going from src="{{ image....
1
vote
1answer
33 views

CP transform renders image 404

I have a transform in my CP called detail large. IN my template the image will render normally. <img class="img-fluid" src="{{ image.getUrl() }}" > Wen i want to use the transform like below: ...
0
votes
0answers
42 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
100 views

Image processing in headless mode

How to do image processing & transformations when not using templates? I'm using react-static for the frontend. Is it possible to have CraftCMS process the images upon upload?
1
vote
1answer
147 views

Image Transform of Transparent Images results with Black Background

As the title suggests, I am receiving a black background on my transparent PNGs. I'd prefer them to be white. I have enabled imagemagick in the config file but still no dice. I noticed GD library ...
1
vote
0answers
70 views

FortRabbit - performance - image transforms

Anybody else have problems with image transforms on FortRabbit? They sent me this article as some background - https://blog.fortrabbit.com/imagemagick-issues I was using the light level of hosting (...
1
vote
1answer
112 views

Image transforms not working on front-end

I'm able to upload images correctly to the server. I can see the thumbnail and view the larger image inside the control panel on the Assets page. However, the front-end image transforms result in a ...
1
vote
1answer
46 views

Can I use GraphicsMagick with Craft CMS?

Short question: Can I use GraphicsMagick with Craft CMS? If yes, how can it be configured? thanks
2
votes
1answer
2k views

How can I set an absolute image url for Open Graph Image tags?

I need the final tag to look like this: <meta property="og:image" content="http://mysite.com/uploads/resources/_hero/myimage.jpg"> If I use something like this: {% set seoImage = entry....
1
vote
1answer
29 views

Craft Equivelent of EE addon CE Image Bulk Tag?

I'm preparing to migrate an old ExpressionEngine site to Craft and there are channels with images that are being resized by wrapping the rich text editor with ce image bulk tag like this: {exp:ce_img:...
1
vote
1answer
86 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
42 views

modify image contrast

In my experience is the build-in process of image transform not too kind to the image quality, even with the highest quality. In my case the brighter tones in the images are lost which means that ...
1
vote
1answer
285 views

Craft isn't regenerating the image transform when the focal point changes

I've got a basic image transform in a template: {% set crop = { mode: 'crop', width: 560, height: 550, quality: 80 } %} <img src="{{ image.getUrl(crop) }}"> Once the ...
0
votes
1answer
1k views

Image Transforms not happening

Apologies if this has come up before. I did check but the previous post referred to version 2.x and was regarding a bug. I have set up 2 image transforms for images but nothing works. The assets ...
2
votes
1answer
295 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=...
1
vote
2answers
443 views

Is it possible to get a transformed image's file size (bytes, not dimensions)?

I'm using a transformed image in a context where there's a maximum file size. Is there a way to determine the transformed image's file size in the templates? .size can't run on the url string
2
votes
2answers
54 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 %} {% ...
2
votes
1answer
390 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 ...
9
votes
3answers
4k views

How do image focal points work in Craft 3?

How do image focal points work in Craft 3? I see the dot in the CP, but I'm unable to set the focus.
1
vote
1answer
316 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".
2
votes
1answer
154 views

Set max-height on image transforms?

Is it possible to define an aspect ratio / set a max height on an image transform, without using a plugin? Let's say the width is fixed to 600px, but the height can be any value up to 800px?
1
vote
1answer
515 views

Get control panel asset thumbnails into a frontend template

My frontend template displays the assets that have been uploaded to Craft. I could create a series of asset transforms within that template to create a range of thumbnail sizes. Not too sure about ...
1
vote
1answer
480 views

Get all available asset transforms

Is there a way to get all available image transforms in a template? I would like to generate the srcset for responsive images programmatically. I thought of creating a macro for that but haven't ...
1
vote
1answer
44 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 ...
2
votes
1answer
698 views

How to get user's photo url without transform?

Craft 3: I'm trying to get User Photo URL WITHOUT any transforms, but none of those options seems to work: (some of it prints the url with some transform) user.photo user.getPhoto() user.getPhoto('...
1
vote
1answer
520 views

Using ImageOptimize, how do you loop through photos?

I'm stumped on a basic concept for looping images. I'm using the plugin ImageOptimize with Imgix and Amazon S3. The code below works but only shows one image (when there's more for that field). For ...
1
vote
1answer
162 views

Local dev issue with transform and detect plugin

I have a local, staging and production setup (Craft 2.6.3011). My local site is having a problem with transforms that seems to be related to the mobile detect plugin (I am using Mikkel Rummelhoff's ...
1
vote
1answer
169 views

Image Transform Files Path

Regarding the Image Transforms and the handling of its files. Is there a config setting that controls the location (file path) of the Image Transform Files? By default there is automatically created ...
1
vote
2answers
595 views

Image transform with focal point - in Element API

I can call predefined image transforms no problem - $image->getUrl('small') but cropped mobile transforms need to use the image asset's set focal point (from the Image Editor). I can't find any ...
0
votes
1answer
237 views

Image transforms on remote server are broken by `cpresources/transforms` url [duplicate]

My local image transforms successfully load in the FE but they do not load remotely. This is the local url where images load successfully /uploads/case-studies/deployment-image/...
1
vote
0answers
180 views

Redactor inserts reference tags into IMG when using image transforms, but tag not being processed by parseRefs

Been working with Craft for about a year, but today for the first time I had to modify the Redactor config to place images inside a body field. I added 'image' to my buttons array and everything ...
5
votes
4answers
280 views

What are the best practices for the development setup?

I've started with Craft developing all locally. The struggle for me when working locally was synchronizing the database and the backend assets with coworkers on the same project. In the last project ...
2
votes
2answers
79 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 ...
1
vote
2answers
603 views

Get a defined image-transform's width and height in front-end template

Is it possible to retrieve a control panel defined imagetransform’s dimensions in a front-end template without having to retrieve an asset? Because when there is no asset provided, I can't seem to ...

1
2 3 4 5