Support » Plugin: Custom Windows Pinned Tiles » Hosting provider with remote wrappers disabled fails

  • Resolved Greg Ross

    (@gregross)


    My hosting provider disabled remote wrappers for file_get_contents so GD can’t load the image through a URL.

    My quick and dirty solution is to use file:// and then have the plugin strip it off before passing an absolute path to the appropriate file.

    In custom-windows-pinned-tiles.php, replace line 258:

    $img = wp_get_image_editor( $input['imgurl'] );

    with:

    $file_url = str_replace( 'file://', '', $input['imgurl'] );
    $img = wp_get_image_editor( $file_url );

    And then manually input a file path in the image selection box in the settings.

    https://wordpress.org/plugins/custom-windows-pinned-tiles/

Viewing 1 replies (of 1 total)
  • Here’s a better bit of replacement code, doesn’t require any special knowledge or action on the users behalf:

    $upload_dir = wp_upload_dir();
    $image_path = str_replace( $upload_dir['baseurl'], $upload_dir['basedir'], $input['imgurl'] );
    
    $img = wp_get_image_editor( $image_path );
Viewing 1 replies (of 1 total)
  • The topic ‘Hosting provider with remote wrappers disabled fails’ is closed to new replies.