• Resolved walkingfish

    (@walkingfish)


    Hi, I am using a CDN for loading my images (Cloudinary). This plug doesnt seen to support CDN – I noticed too there is no “Load image from URL” option as well. I’m sure this is turned off to prevent you from using video, etc. w/o paying for the pro-version. 😛

    Anyways, If I use an image from my media library (which is linked to a CDN), I get an error: “ERROR File doesn’t exist? Check file permissions”.

    The error is as follows:

    Slide ID: 73
    object(WP_Error)#352 (2) {
      ["errors"]=>
      array(1) {
        ["error_loading_image"]=>
        array(1) {
          [0]=>
          string(25) "File doesn’t exist?"
        }
      }
      ["error_data"]=>
      array(1) {
        ["error_loading_image"]=>
        string(137) "C:\xampp\htdocs\wp-core/wp-content/uploads/http://res.cloudinary.com/myUserName/image/upload/v1384541212/slider01_mlezah.jpg"
      }
    }

    Obviously the plugin is adding a content path of the media library and the CDN plugin uses the URL –> These are getting combined for the image link.

    To fix this, and it should be easily done, is to remove the code-block within the Meta Slider plugin to exclude the “C:\xampp\htdocs\wp-core/wp-content/uploads/” or media file folder location.

    My problem is: I cant find where it is in the ton of .js files included in this plugin. Can anyone (this plugin developer?) point me to where it is so I can work around this?

    Thnx and any help is greatly appreciated!!!

    http://wordpress.org/plugins/ml-slider/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Load image from URL isn’t there because Meta Slider needs the files to be local, so it can do stuff like automatic resizing and cropping based on the slideshow settings – if the file is remote then it can’t do that. In short, it’s ‘turned off’ because its incompatible with Meta Slider.

    You’ll want to look at inc/slide/metaslider.image.class.php, in there there’s a function called ‘get_public_slide’ which you’ll need to make some changes to.

    Regards,
    Tom

    Thread Starter walkingfish

    (@walkingfish)

    Thx – I just discovered how to do it:

    Within: “\ml-slider\inc\metaslider.imagehelper.class.php

    Line 27:
    Change from: $this->url = $upload_dir['baseurl'] . "/" . get_post_meta($slide_id, '_wp_attached_file', true);

    To: $this->url = get_post_meta($slide_id, '_wp_attached_file', true);

    This changed the HTML output and thus now allows to pull from the CDN. 🙂

    However the error still shows in the admin and to fix that, remove lines 269 thru 281

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

The topic ‘Meta Slider Work-Around for CDN’ is closed to new replies.