News:

Support the VirtueMart project and become a member

Main Menu

Responsive image plugin

Started by derek webster, December 16, 2020, 12:51:16 PM

Previous topic - Next topic

derek webster

Hi, I'm trying to develop a plugin that automatically converts any uploaded media into multiples webp or jpg images with different resolutions. So far I'm able to do this using the  plgVmAfterStoreProduct trigger. But the issue I'm running into is that my function cant really run until the image has fully uploaded. so it fails at first. If I wait a second then save a product again then the script works as the image file has obviously uploaded in that time.

My question is... Can anyone suggest a better method for triggering this script? Is there anyway to attach a script like this on to the end of the MediaUpload function? I couldnt find any triggers to allow this.
I'm more of a front end dev - I'm just dipping my toe in writing a plugin.

Many thanks

I'm using VirtueMart 3.8.6 10373


pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

derek webster

Hm I searched a long time and never found anything. Perhaps you could post a hint as to the name of this plugin? Perhaps it doesn't do exactly as I'd like.
It's still been a good learning curve for someone who has never really done any development work before.

pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

derek webster

Sorry for the delay, Thank you  - yes this plugin looks great just exactly what I need