WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Cache Images] Anyway to automate the process?

[Plugin: Cache Images] Anyway to automate the process?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Milan Dinić

    @dimadin

    I was thinking about this but I wanted to first release improved version of initial functionality.

    Also, I’m still not sure how that would work: will autocaching be done always when plugin activated or user will need to check something.

    Some ideas could be:

    Always cache all images when publishing a new post.
    Always cache images from a user specified list of domains.

    Maybe can check how the Hot-Linked-Imge-Cacher does the automatization.

    http://wordpress.org/extend/plugins/hot-linked-image-cacher/

    it does a pretty good job automating the image caching,
    but the problem is that it renames the images to alfanumericshit.jpg and does not include the cached images to the media library.

    be careful testing the plugin, because the effects are un-reversible!

    Plugin Author Milan Dinić

    @dimadin

    Good news, guys! If you download development version, you can turn on automatic caching.

    Just go to Settings > Media and check Automatically cache images on post’s saving. I tested this and it works good but it’ll be great if more people would test.

    I’m only thinking should settings field be moved to Settings > Writing.

    Thanks dimadin, great plugin.
    Works fine, but I’ve a problem with feedwordpress plugin.
    If I use manual update in feedwordpress images are cache fine, but with automatic update I receiving an error:

    Warning:  Invalid argument supplied for foreach()
    in /wp-content/plugins/cache-images/cache-images.php on line 516
    
    Fatal error:  Call to undefined function media_sideload_image()
     in /wp-content/plugins/cache-images/cache-images.php on line 488

    Thanks.

    Plugin Author Milan Dinić

    @dimadin

    Can you try possible fix before my release to a plugin? Go to Plugins > Editor. On the right, from “Select plugin to edit”, choose Cache Images and press “Select”. Now choose file cache-images/cache-images.php from a new list.

    In text editor, find a line
    $upload = media_sideload_image($url, $postid);
    Just above it, add next line:
    require_once(ABSPATH . "wp-admin" . '/includes/media.php');

    Tell me is it works now.

    Plugin Author Milan Dinić

    @dimadin

    You can now also try development version, which includes this code.

    Hi.

    Do not works…

    Fatal error: Call to undefined function media_sideload_image() in /wp-content/plugins/cache-images/cache-images.php on line 488

    Plugin Author Milan Dinić

    @dimadin

    Are you sure you used either development version or the one you edited with my instructions?

    In both cases you shouldn’t get exactly the same error, line number should be changed.

    Please try again so that I know is this fixed since I’ll release a new version with some bug fixes today.

    Yes, you’re right! I’m sorry.

    New error:

    Call to undefined function download_url() in /wp-admin/includes/media.php on line 556

    Plugin Author Milan Dinić

    @dimadin

    I’ve just released a new version so please see if issue is fixed now since I added another update that should solve it.

    No errors… but do not works.

    Plugin Author Milan Dinić

    @dimadin

    Maybe problem is with feedwordpress (eg. if they use WP’s hooks on different way).

    When I have time, I’ll inspect it more deeply. (no promises!)

    Anything new on that? Thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Cache Images] Anyway to automate the process?’ is closed to new replies.