Author Topic: Responsive image plugin  (Read 448 times)

derek webster

  • Jr. Member
  • **
  • Posts: 82
Responsive image plugin
« on: December 16, 2020, 12:51:16 pm »
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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 904
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Responsive image plugin
« Reply #1 on: December 16, 2020, 13:21:04 pm »
this plugin allready exist
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

derek webster

  • Jr. Member
  • **
  • Posts: 82
Re: Responsive image plugin
« Reply #2 on: December 17, 2020, 01:05:39 am »
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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 904
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Responsive image plugin
« Reply #3 on: December 17, 2020, 17:04:42 pm »
https://dj-extensions.com/dj-webp

We use two years, I think
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

derek webster

  • Jr. Member
  • **
  • Posts: 82
Re: Responsive image plugin
« Reply #4 on: January 12, 2021, 12:59:42 pm »
Sorry for the delay, Thank you  - yes this plugin looks great just exactly what I need