• Hi,

    Thanks for great plugin, but lately I found a problem.

    I am using this plugin to add manually watermark to images -> https://ww.wp.xz.cn/plugins/image-watermark/ and it works fine with newly uploaded images to media library.

    When I replace image, and than try to add watermark there is a path problem “Warning: getimagesize(//wp-content/uploads//wp-content/uploads/2014/12/test-image-1.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /wp-content/plugins/image-watermark/image-watermark.php on line 1022″.

    When I delete test-image-1.jpg from media library and upload it again, image watermark works ok – it seems there is a problem with replaceing image.

    https://ww.wp.xz.cn/plugins/enable-media-replace/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter serandom

    (@serandom)

    $data = wp_get_attachment_metadata($media_id, FALSE);

    After uploading image to media library:
    $data[file] => 2014/12/test-image-1.jpg

    After replacing image:
    $data[file] => /wp-content/uploads/2014/12/test-image-1.jpg

    This is strange, since I am using the core WP method to generate the metadata upon replacing:

    wp_generate_attachment_metadata()

    Also, I am using the GUID from the database so this really should not happen unless WP uses a different method to generate the path stored in the database on upload.

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

The topic ‘Filepath problem’ is closed to new replies.