Title: Error while viewing on Mobile Devices
Last modified: June 4, 2019

---

# Error while viewing on Mobile Devices

 *  Resolved [spatwa110](https://wordpress.org/support/users/spatwa110/)
 * (@spatwa110)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/)
 * Error while viewing on Mobile Devices.
    Here is the error: “Warning: Division
   by zero in /wp-content/plugins/parallax-image/assets/shortcode.php on line 101”
 * How do i fix this? This is very urgent.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-while-viewing-on-mobile-devices%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11604829)
 * Hi.
 * Do you have a mobile image specified?
 *  Thread Starter [spatwa110](https://wordpress.org/support/users/spatwa110/)
 * (@spatwa110)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11604841)
 * 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.
 *  Thread Starter [spatwa110](https://wordpress.org/support/users/spatwa110/)
 * (@spatwa110)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11604923)
 * 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.
 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11604943)
 * 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 7 years ago by [thehowarde](https://wordpress.org/support/users/thehowarde/).
 *  Thread Starter [spatwa110](https://wordpress.org/support/users/spatwa110/)
 * (@spatwa110)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11605044)
 * i tried uploading the image and assigned it to the shortcode but no luck. I am
   still getting the error.
 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11605077)
 * 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()](https://www.php.net/manual/en/function.getimagesize.php)
 *  Thread Starter [spatwa110](https://wordpress.org/support/users/spatwa110/)
 * (@spatwa110)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11605100)
 * 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.
 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11605104)
 * Try using just “StarParallax2.jpg”
 *  Thread Starter [spatwa110](https://wordpress.org/support/users/spatwa110/)
 * (@spatwa110)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11605312)
 * 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/](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](https://www.jqueryscript.net/animation/Responsive-Performant-Background-Parallax-Effect-Parallax-Background.html)
 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11605370)
 * 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 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Error while viewing on Mobile Devices’ is closed to new replies.

 * ![](https://ps.w.org/parallax-image/assets/icon-128x128.png?rev=1627242)
 * [Parallax Image](https://wordpress.org/plugins/parallax-image/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/parallax-image/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/parallax-image/)
 * [Active Topics](https://wordpress.org/support/plugin/parallax-image/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/parallax-image/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/parallax-image/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/error-while-viewing-on-mobile-devices/#post-11605370)
 * Status: resolved