Hi.
Do you have a mobile image specified?
Yes however it is the same image that i have for large devices. I am using the same images assigned to both. Funny thing is it is working on my test environment and as soon as i moved it to live server it is now giving me this error on mobile devices only. While viewing it on desktop i get no errors.
I tested everything on my side and that is deactivating all the plugins to see if there are any conflicts. I also tried downgrading the wordpress version to see if that was causing an issue but no luck. My guess is it is something to do with your plugin.
Thank you.
The only reason it would get a divide by zero error here is because it can’t find the mobile image. Try re-uploading the mobile image separately and specify it in the shortcode settings. Or leave out the mobile image if you’re not using it.
-
This reply was modified 6 years, 11 months ago by
thehowarde.
i tried uploading the image and assigned it to the shortcode but no luck. I am still getting the error.
I would need more details to troubleshoot your issue.
What is the shortcode you are using – include it here?
How have you specified everything in the shortcode, and on the site?
What type of image is in use?
The divide by zero error is because your image is failing to return a number for the php function getimagesize. PHP getimagesize()
Here is the shortcode:
[dd-parallax img=”WEBADDRESS/wp-content/uploads/2019/05/StarParallax2.jpg” height=”500″ speed=”5″ z-index=”1″ position=”center” offset=”true” mobile=”WEBADDRESS/wp-content/uploads/2019/05/StarParallax2.jpg”][/dd-parallax]
It is a jpeg and it is pointing directly to media folder through a direct URL.
Try using just “StarParallax2.jpg”
Man you are genius!!. That worked however, i am curious why would something like that cause an issue? I mean i had the whole image path assigned. Thank you.
Another issue is the mobile image losses its parallax effect on mobile devices. Now, i sort of know this doesn’t work very well on mobile devices but is there any way you can make it possible using JavaScript or jquery.
Look at this example: https://www.jqueryscript.net/demo/Responsive-Performant-Background-Parallax-Effect-Parallax-Background/
Download:
https://www.jqueryscript.net/animation/Responsive-Performant-Background-Parallax-Effect-Parallax-Background.html
This parallax effect doesn’t work on mobile. I am using a different parallax effect than the one you reference.
Glad your issue is fixed though.
Thanks 🙂