Fotorama works normally until I click add to basket. After the page reloads this then shows collapsed (as per the image) and logs a couple of errors to console.fotorama collapsed

fotorama.js:99 Uncaught Fotorama requires jQuery 1.8 or later and will not run without it.Uncaught Fotorama requires jQuery 1.8 or later and will not run without it

gallery.js:290 Uncaught TypeError: settings.$elementF.fotorama is not a function
  • Actually jQuery is missing or you are using jQuery older than 1.8 So it is not working. Oct 25, 2017 at 8:41
  • This definitely isn't true - as I can access it in console. Also it works until after I've added to cart and the page reloads. Oct 25, 2017 at 9:30
  • Yes I faced same issue what you need to do put your fotorama code in the time out means it should run after 5 second after page loads Because in my case also same issue it was not working in the first page load once i refresh it works I use time out so once page loads all javascript loads after that fotorama code executes so all worked fine. Oct 25, 2017 at 9:36
  • I don't fully understand what you're saying here, but please give a proper answer and some code if you have an explanation :) Oct 25, 2017 at 17:55
  • Please post your javascript code here which you are using for slider. Oct 26, 2017 at 3:48

1 Answer 1


I believe I have solved this issue by adding the following to my requirejs-config.js file:

var config = {
    shim: {
        'fotorama/fotorama': {
            deps: ['jquery']

More info on shim configuration: http://requirejs.org/docs/api.html#config-shim

  • which configuration would you use this shim in? Apr 25, 2018 at 14:56
  • @ol'bobdole It goes in your theme or module's requirejs-config.js file. E.g. for your theme: app/design/frontend/[vendor]/[theme_name]/requirejs-config.js. I've updated my answer will a full example.
    – Rich
    Apr 26, 2018 at 0:42
  • any solution here please post and it would be helpful. Thanks in advance Jun 2, 2020 at 15:44
  • The above answer didn't solve the issue.
    – Haerriz
    Oct 14, 2020 at 11:36

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.