I have created and maintain Magento extension (responsive banner slider) but have run into an issue.

I have added functionality based on the HTML5 picture element which will be supported by browsers in the future (the current implementation is a javascript polyfill implementation based on HTML5 specification). The picture element allows to deliver an appropriate image to every user depending on a variety of conditions like screen size, viewport size, screen resolution and thus saves bandwidth/load time on mobile devices. For this I have built functionality that will create smaller sized images for every banner that is uploaded through my extension.

FO user who upgrade from a previous version these smaller images will need to be batch created for all existing banner images. But what I cant seem to find out is how to trigger a helper function that will perform this action and is only run once after the upgrade from the current version to the future version which where this functionality will be implemented. I know how to write upgrade / data scripts but this only allows for database manipulation. Can someone point me in the right direction on how to implement this.

1 Answer 1


I don't know where did you get the idea that upgrade scripts are for db manipulation.
You can do anything with them.
If you want to use a helper I would suggest using the datafolder.
Create the file [Namespace]/[Module]/data/[resource_setup]/upgrade-x.y.z-a.b.c.php


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.