I want to override a JS file which lives in following folder


I want to override this file from my custom admin theme or by a module.

Any code snippet or how-to will be greatly appreciated.


  • Did you want to override in custom front or admin theme? – Rakesh Jesadiya Dec 14 '17 at 13:11
  • I want to override it in adminhtml – nuwaus Dec 14 '17 at 13:13

You should copy this file to your theme by following path:


*replace 'Magento\luma' by your own theme

And then make necessary changes into the file. Magento will use this file automatically instead file from the lib folder.

|improve this answer|||||
  • 1
    thanks for the reply, but I want to override it in adminhtml. – nuwaus Dec 14 '17 at 14:14

In the Module Magento2-base


You have seen the script include that js/image.js

How to override this htm file read more here : https://stackoverflow.com/questions/37430036/override-html-file-in-custom-module-magento2

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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