WordPress.org

Ready to get started?Download WordPress

Forums

Imsanity
Images don't appear and resize failing (12 posts)

  1. schultzrach
    Member
    Posted 1 year ago #

    I am trying to do a bulk resize of all my photos to no greater than 600 pixels wide. When I press "search images" only some old, renamed or deleted images appear. In my media library there are many more photos than what show up to be resized.

    If I do try to resize any of the photos Imsanity lists, I receive this error:

    ERROR: /home/davidsch/public_html/wp-content/uploads/2012/10/DSCN5853.jpg (No editor could be selected.)
    RESIZE COMPLETE

    Thank you for any help!!

    http://wordpress.org/extend/plugins/imsanity/

  2. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    It looks like WordPress throws error 'No editor could be selected' when neither GD or ImageMagick is available on your server. So it doesn't have the capability to resize images.

    As far as Imsanity not finding other images - it uses the metadata in WordPress to see what images are there and need resizing. It doesn't look at the filesystem for images. So it could be if you don't have any image manipulation libs on your server that WordPress hasn't been keeping track of the size in its metadata..?

    Alternatively - Imsanity only looks for files that are larger than your set limit. So any images that aren't large won't be found either.

  3. schultzrach
    Member
    Posted 1 year ago #

    What are GD and ImageMagick? How do I find out if I have them and get them if I don't?

    What are image manipulation libs? How do I know if WordPress has been keeping track of size in its metadata?

  4. schultzrach
    Member
    Posted 1 year ago #

    I'd really like to use this plugin, but I need help.

  5. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    GD and ImageMagick are external graphics libraries that PHP uses to manipulate images. Unless you are running your own server then you need to talk to your hosting company or server admin about enabling them.

    You only need one. GD is usually installed with PHP by default. ImageMagick is more of an advanced add-on. WordPress needs at least one of them, otherwise Imsanity won't work I'm afraid.

  6. schultzrach
    Member
    Posted 1 year ago #

    I had GD installed on my server. I'm still having the same problem. All the images in my media library aren't appearing, only old, deleted photos.

  7. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    I suspect the reason no images are being returned is because you didn't have GD installed or enabled at the time the images were uploaded. If you are still getting the "no editor" message then that means GD is still not working. But, regardless of whether it's working now or not - if GD wasn't installed when those images were uploaded originally then WordPress was not able to determine the height/width of the image. So it won't have saved that info with the file meta-data and Imsanity will ignore those images.

    I would look at your database and find an image or two that are not being found. run this query, fine one of the images and look at the "file_meta" column. You should see height/width information. If not, then that means WordPress didn't save it when the file was uploaded.

    select
    wp_posts.ID as ID,
    wp_posts.guid as guid,
    wp_postmeta.meta_value as file_meta
    from wp_posts
    inner join wp_postmeta on wp_posts.ID = wp_postmeta.post_id and wp_postmeta.meta_key = '_wp_attachment_metadata'
    where wp_posts.post_type = 'attachment'
    and wp_posts.post_mime_type like 'image%'
    and wp_posts.post_mime_type != 'image/bmp'
  8. schultzrach
    Member
    Posted 1 year ago #

    I installed imagmagick and many (almost all) of the image in my media library are not being found.

    Here is the output from imagemagick on my server showing that it is
    installed and loaded into php.

    [root@host /home/davidsch/public_html]# convert -version
    Version: ImageMagick 6.8.2-2 2013-02-11 Q16 http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
    Features: DPC OpenMP
    Delegates: bzlib fontconfig freetype jng jpeg png ps tiff xml zlib

    [root@host /home/davidsch/public_html]# php -i | grep magick imagick imagick
    module => enabled imagick module version => 3.1.0RC2 imagick classes =>
    Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator ImageMagick version
    => ImageMagick 6.8.2-2 2013-02-11 Q16 http://www.imagemagick.org
    imagick.locale_fix => 0 => 0 imagick.progress_monitor => 0 => 0 magickwand

  9. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    post the contents of the wp_postmeta.meta_value column from an image that you think should be found by Imsanity but is not being found.

    If the graphics library was just installed - it's not going to correct any existing images in WordPress that were uploaded prior to the library being installed. Perhaps there is a plugin or something that will tell WordPress to go back and "re-scan" all of the past uploads - I don't know if such a thing exists, though.

  10. schultzrach
    Member
    Posted 1 year ago #

    Isn't resizing pre-existing images exactly what imsanity is supposed to do?

    "If you have existing images that were uploaded prior to installing Imsanity,
    you may resize them all in bulk to recover disk space. To begin, click the
    "Search Images" button to search all existing attachments for images that are
    larger than the configured limit."

  11. Jason
    Member
    Plugin Author

    Posted 1 year ago #

    yea but it relies on the WordPress metadata.

  12. pumpkinslayer
    Member
    Posted 1 year ago #

    @schultzrach I had issues before as @Jason explained (not with this plugin though), where I had uploaded pictures and their images were on the server, but the metadata that WordPress had saved was either wrong or missing.

    That was a while back, but unfortunately the only way I got around that was to just ignore the problem and simply deal with new images going forward. I did reupload some of the images and reinsert them into the posts, which fixed the metadata but wasn't worth the time, so I just left most of them alone.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic