cancel
Showing results for 
Search instead for 
Did you mean: 

Gerenate product image on the fly

Gerenate product image on the fly

Hi all,

 

I'm new to Magento 2. I need to generate all the product images on the fly, taking in account the current logged in customer, so I can apply his/her logo to the original added images (using PHP GD, for instance).

 

I read in some forums, that it is possible to resize images on the fly, by using Magento\Catalog\Helper\Image class. So I thought it might be possible to get the original product images, plus the current user, and generate my custom image content. Of course, this will be a per-request procedure, because I don't want to change the original images, to avoid all the other users to get unwanted image content.

 

Is there any way to achieve that?

 

Please let me know if I did not make myself clear.

 

Thanks in advance

1 REPLY

Re: Gerenate product image on the fly

@diogo_domanski Based on your explanation it seems like you wanted to generate product image based on customer logo or whatever image they upload.

yea resize image method are there but it resize exiting image but in your case required to stamp customer image into product. If you elaborate what kind of your product and customer image then could help you in suggesting lib / classes which you can use to achieve your need.

 

Cheers!

-
Magento Programmer | Was my answer helpful? You can accept it as a solution.