doublesecretagency / craft-digitaldownload

Digital Download plugin for Craft CMS
Other
4 stars 4 forks source link

Use Image Transformation on secure assets? #9

Open CAIDcreative opened 3 years ago

CAIDcreative commented 3 years ago

Hi,

Question, is it possible to use craft's image transform with this plugin? I'm hoping to have image displayed inline be secure behind user login, but I can't figure out if it's possible to use this alongside craft's image transformation. Not sure if this is possible or could be added as a feature.

Thanks.

lindseydiloreto commented 3 years ago

Hi there,

That is a fascinating question. Technically speaking, Digital Download doesn't give any special treatment to image files (as opposed to PDFs or other filetypes). It is completely filetype agnostic.

Are you just trying to ensure that the downloaded images are restricted to specific dimensions?

CAIDcreative commented 3 years ago

Sorry if this is a weird one,

The images are uploaded by end users on the front-end but also need to be secure. It's difficult to style or implement lazy-loading without craft's asset transform as they could be any dimension. Ideally if there was an option in the twig function where I could pass in the image transform I could style thumbnails with the function once, and link to it with different parameters.

lindseydiloreto commented 3 years ago

I don't think this is currently possible, sorry.

It's an interesting idea though, we'll keep this thread open as a feature request! 👍