Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Combine images #283

Open
adrienne opened this issue Oct 28, 2019 · 2 comments
Open

Feature Request: Combine images #283

adrienne opened this issue Oct 28, 2019 · 2 comments

Comments

@adrienne
Copy link

This is kind of a long shot but it seems possible; it's probably less complicated than watermarking, overall! What I'd like to be able to do is pass Imager an array (or ElementModel collection) of images, with some parameters, and have it crop them all and arrange them in a row or a grid.

My vision is that you'd have something like this:

{% set newImage = craft.imager.transformArray(imageArray, {mode: grid, grid: { gridColumnWidth: 200, gridRowHeight: 300, itemResizeMode: 'crop', gridColumns: 4, gridRows: 'auto', bgColor: '#000000' } } %}

Or something, and it would resize each image individually (to 200 x 300, in the above example) and pour them into a grid with (in the above example) 4 columns and however many rows it needs. If there was any space not filled by images, it'd fill it with a background color or leave it transparent, whatever.

@aelvan
Copy link
Owner

aelvan commented Oct 30, 2019

Hi,

I feel like this is a bit too far from what Imager does today, to be a natural feature to add. Also, it'd probably be easier to create a separate plugin that does just this, than trying to wrangle it into how Imager does things.

Why can't you do the grid layout in css, is it for emails or something?

I've been toying with the idea of adding functionality for merging/overlaying images, it might be that something like that could be possible to use for what you want, if abstracted enough. I'll leave this open for now so I'll remember to revisit at some point.

@adrienne
Copy link
Author

adrienne commented Nov 1, 2019

@aelvan - for Facebook/Twitter card images, actually, so yeah, no CSS -- all has to be one merged image. I'm currently using the watermarking functionality to overlay one image on my background, but there's a separate usecase where i need to overlay several images at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants