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 [image-transforms]

Craft's native, non-destructive image manipulations.

0
votes
0answers
9 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
21 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 ...
1
vote
1answer
37 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=...
0
votes
0answers
20 views

TIFF & Image Transforms on Craft 3

I'm building a "press downloads" page for a customer who should be able to upload hi-res JPG and TIFF files for printing purposes. I'm trying to automatically generate preview thumbnails with image ...
1
vote
2answers
30 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
39 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
69 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 ...
2
votes
3answers
475 views

How do image focal points work in Craft 3?

How image focal point is working in Craft 3? I Just see the dot but unable to set focus.
1
vote
1answer
97 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
1answer
41 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?
0
votes
0answers
51 views

IMG with defined width/height in rich text field

I have a Rich Text field where the user (Craft 2.6) can upload/add images. However the <img> tag that gets generated just has the src on it and I need it to also define the IMG's true width/...
1
vote
1answer
129 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
84 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
35 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 ...
0
votes
0answers
34 views

Division by Zero Image Transforms

Just started having an issue with image transforms. All of the sudden when I try to do image transforms, I'm getting the following error "Internal Server Error - Division by zero". Not sure where to ...
3
votes
1answer
156 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
173 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
64 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
52 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
298 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
133 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
56 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
196 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
53 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
1answer
152 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
vote
2answers
215 views

How can I base64-encode an Image Transform?

I'm trying to use this plugin, but it requires an AssetFileModel as input. I can pass it the asset in question, no problem, but I'm wanting to pass it a transformed version of the asset. However, it ...
1
vote
1answer
150 views

Image transforms return cpresources URL and doesn't apply crop

Despite having tried the tips from Image transforms returning cpresources url, I am still having issues with image-transforms. the problem is when i put the image without transform it work fine, but ...
1
vote
1answer
33 views

Border Radius on Image Transforms

Is it possible to add a border-radius to an Image Transform? I'm using circular profile photos for a client. I could do the radius in CSS, but it'd be nice for the image to output with the radius.
0
votes
0answers
27 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 %} {% ...
0
votes
1answer
32 views

Image transform glitches

We're having trouble with images being transformed with glitches in them. What would you advise to debug behavior like this?
5
votes
1answer
175 views

Can you prevent upscaling when using Craft's image transforms?

With Craft's image transforms used to resize images or generate thumbnails, can you prevent images from being upscaled? There's often cases where it makes no sense to increase the dimensions of an ...
1
vote
1answer
330 views

Craft 3: Image transformation - grayscale

Are there any image manipulation options in Craft 3? Like grayscale or so? (what imager does for Craft 2: https://imager.vaersaagod.no/?img=5&demo=basic-image-adjustments)
0
votes
0answers
44 views

image in Portrait mode is rotated 90 degrees after upload

Got something weird on one of my sites. Whenever I upload an image (client takes them with his phone in portrait mode) it's turned 90° clockwise. A few Craft updates back I had a similar issue on ...
2
votes
2answers
498 views

Applying an image transform returns a 404 cpresources URL

EDIT 3: Started using imager and no longer have the problem. It's not a real answer to the problem but solves the problem. This is the situation that has me pulling my hairs... I've looked at other ...
1
vote
1answer
78 views

Craft creating dirty transparent background on image transformations / resizing

for anyone experiencing dirty transparent backgrounds when you transform transparent PNG images with Craft like this: Source Image: Resized, dirty: Craft Command: craft.assets.id(2).first().getUrl({...
1
vote
1answer
98 views

User-selected Image Transform

I've set up four custom image transforms on the page and would like the content editor to be able to select which size they want the image to be from a drodown field preconfigured with the ...
1
vote
1answer
64 views

Why do Image transformations rename the image?

I noticed that when performing an image transition on an image, the resulting image name is computer gibberish. How can I maintain the original name of the image? Keeping the original name is ...
2
votes
1answer
253 views

Image transform not working with different locales

Working on a site that has a bunch of different locales, I'm bumping into the following issue: On an entry in locale X, I have an image that is displayed with a transform applied to it. However, ...
1
vote
1answer
239 views

Image transform in a plugin

How can I trigger an image transform in a Craft plugin?
1
vote
1answer
137 views

asset.first().getUrl('transform') not working for s3 asset - Craft CMS 2.6.2980

I can load the s3 image fine using the s3 base path and the craft cms filename that is saved in the craft cms database: <img src="{{cdnUrl}}/filepath/{{entry.Image.first().filename }}" /> ...
0
votes
0answers
233 views

imagemagick bad quality of transforms

Website is hosted at digitalocean.com 512MB droplet plus its serverpilot control panel. I've installed imagemagick using their guide - https://serverpilot.io/community/articles/how-to-install-the-php-...
2
votes
1answer
111 views

When image transforming png to jpg, alpha layer become lined

I have several png images that when transformed from png to jpg, the alpha layer is transformed to an horizontally lined pattern. Therefore I have to keep them as png, wich is in my case unnecessary ...
2
votes
1answer
129 views

Pass image transformations into macro

I have a very basic macro for a lazyloading responsive image tag: {% macro isotopeItem(imgParam) %} {% set thumb = { mode: 'fit', width: 100, quality: 60, } %} {% set tSM = { mode: 'fit', width: ...
3
votes
1answer
217 views

Why are gif transform file sizes very large?

Our site makes use of gifs to enable the client to upload basic animating images. Any asset field on the site can be jpg, png or gif, and the site makes significant use of transforms for responsive ...
2
votes
1answer
132 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 ...
1
vote
1answer
734 views

Image transforms not working properly

I have 2 basic JSON files, the only difference between the files is the product.type('') In my general.php I have turned on 'generateTransformsBeforePageLoad' => true, The first JSON file (200 ...
2
votes
2answers
316 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
0answers
77 views

Disable SVG previews for asset field?

A client of mine uploads multiple, complex SVGs (2MB and larger) to an asset field. Unfortunately, Craft CMS isn't able to automatically generate thumbnail images (with a reduced filesize, not just ...
1
vote
1answer
509 views

Image Transform Internal Server Error (500 code) after Craft CMS update

I just updated an "older" Craft site (version 2.4.2702) to the newest update (version 2.6.2958). But now all my image thumbnails in the back-end are missing and if I upload any new assets, the ...
0
votes
1answer
59 views

Pulling images from other sections with image transform

I would like to display images from various sections, in this case the home page. I am still coming to terms with Twig/Craft's criteria models and the transform makes it confusing. {% for image in ...