Hi, I am trying to show the preloader of magnigic popup for images, but it does not load the image.
It opens the lightbox. It shows the “loading” and “finished loading” texts. But no image, only the message that says that “the image could not be loaded”.
I customized the file at wp-content/plugins/mediapress/assets/js/mpp.js and changed the line where it says:
type: ‘inline’, // <——- Here I changed inline to image to activate the preloader.
preload: [0, 0],
preloader: true, // I added this also.
It works fine with type: ‘inline’, but not with type type: ‘image’. Any help is appreciated, thanks.
Thank you for the question.
we can not use the type image as we load custom html and the media directly. Image type is used when you ask the popup to load media directly.
I am not aware if magnific popup supports preloader for inline content or not.
This may work for you
I haven’t tested it. Will test tomorrow.
I will also suggest troubleshooting why the loading is slow.
Hi, thanks for the help so far, where you able to test that option?, it does not work for inline media when I tested it.
Maybe its slow because I have a shared hosting server?, anyway, I think a “loading” message would be really useful even for users with slower internet connections.
I had a look and I do see that the preloader does not work with inline content.
The problem is inline content loads immediately and it is the image inside the content which takes time to load.
Currently, I am not seeing any direct way other than implementing our own loading indicator for image(something like lazy loading).
You must be logged in to reply to this topic.