Shiba Media Library Plugin

The purpose of the Shiba Media Library Plugin is to facilitate the manipulation and grouping of images within the existing WordPress image library framework.

[Most recent Shiba Media Library updates]

September 13th 2015 – Release 3.9.1

  • Updated thumbnails column for WordPress 4.3.
  • Tested on WordPress 4.3.

May 2nd 2015 – Release 3.9

  • Updated image search function (in the Media Manager interface) so that it works for attachment titles, alt text, as well as captions.
  • Tested plugin on WordPress 4.2.

When creating permalink structures, care must to taken to ensure that the new structure does not override existing post, page, category, and tag permalinks.

Key Features of the Shiba Media Library Plugin

  • Enables image tagging and allows you to group images into galleries by using their tags. Images can also to added manually using the regular media manager interface.
  • In addition to images/attachments, galleries may also contain posts and other galleries. In this way, you group not only images, but also posts, galleries, and any combination of these object types. Here are some fun things you can achieve with expanded galleries.
  • Easily search for posts, pages, galleries, and more in the expanded media manager interface, and include them directly into a gallery. The days of painfully hunting for IDs are over!
  • Freely order images, posts, and pages within a gallery.
  • Gallery objects get saved into your WordPress export files. This allows you to keep a backup of your gallery objects, as well as move them from blog to blog.
  • Expanded media manager image search that allows you to find images based on title and alt text.
  • Expanded search that allows you to find attachments and galleries based on titles, tags, and categories.
  • Show the number of posts an image containing an image in the Media >> Library screen.
  • View most-used tags for post, attachment, and gallery objects.
  • Quick Edit image attachments.
  • Adds a new drop-down menu to your existing WordPress Media Library. This menu will allow you to do bulk attachments to both attached and non-attached images.
  • Detach a set of images from their post so that they revert back to their unattached state.

The Power of Galleries and Tags

Gallery objects are stored in the regular WordPress post database. In this way, you get to leverage almost all existing functions that are available for WordPress post objects including displaying your galleries using the WordPress gallery shortcode.

Galleries created with the Shiba Media Library Plugin should also work with other plugins that support the WordPress gallery shortcode.

This entire plugin operates within the current WordPress Media Library framework so any tag changes will automatically be reflected in your WordPress gallery shortcode results.

If you want to extract images with particular tags using PHP, just include the tags in your WordPress get_posts command.

$args = array(	'post_type' => 'attachment',
		'tag' => 'tag-a,tag-b,tag-c' );
$attachments = get_posts( $args );

Why Can’t I Use Tags in the Gallery Shortcode?

The Shiba Media Library addresses the media library back-end and sets up tag links in the WordPress database. I.e., there is a link in the database saying that a particular image is linked to a given tag.

For tags to work in the gallery shortcode, it must also be supported on the gallery front-end – i.e., by the plugin that renders your images. The Shiba Gallery plugin, for example, supports image tags.

However, most gallery rendering plugins do not yet support this extension because it is currently not part of the native WordPress gallery shortcode and is therefore not a standard.

Shiba Media Library Updates

The new version of the plugin only operates on WordPress 3.5.

Shiba Media Library 3.8.2

September 17th 2014

  • Updated the Add-Media templates and interface so that images can be properly selected and inserted.
  • Updated the media table in the Edit Gallery screen so that it renders properly in WP 4.0.
  • Updated some deprecated functions.
  • Tested plugin on WordPress 4.0.

Shiba Media Library 3.8

April 22nd 2014

  • Updated plugin directory and url paths to use standard functions instead of constants.
  • Updated the Galleries >> Options screen to use the new wordpress update settings system (add_settings_error).
  • Fixed a bug in the Media screen that occurs when expanded bulk operations are applied to an empty image set.
  • Tested plugin on WordPress 3.9.

Shiba Media Library 3.7.2

Dec 24th 2013

  • Fixed some warning messages and make sure post images show up when editing a gallery.

Shiba Media Library 3.7

Sept 26th 2013

  • Posts, pages, and supporting custom post types can now be included in galleries from within the media manager interface.
  • Expanded search for images to include title as well as alt text.
  • Show number of posts that an image is included in (i.e. included in post content). Gallery images are not counted.
  • New options page. You may now enable or disable the image quick edit, number of posts, and expanded media manager search functionalities.
  • Fixed URL too long bug.

Shiba Media Library 3.6

Jan 7th 2013

  • Updated for 3.5.
  • Plugin gallery objects now use the id list system introduced in WordPress 3.5. Use the new media manager interface to upload and attach images to gallery objects.
  • Fixed quick edit functions.
  • Updated deprecated media functions.
  • Encapsulated the plugin options page within an object class.
  • Fixed gallery and attachment tag links in tag-metabox.
  • Added an attachment_link filter so that %category% gallery-permalinks translate properly.
  • Properly redirect bulk operations and delete permanently operation in the Edit Gallery screen.

Shiba Media Library 3.4

August 20th 2012

  • Updated for WordPress 3.4.
  • Added Quick Edit functionality to images. Quick Edit capability is accessible in the Media Library and Edit Gallery screens.
  • Image ordering will now be saved in both draft and published modes.
  • Updated old javascript functions to use jQuery.

Shiba Media Library 3.3

August 31st 2011

  • Added ability to order images within Gallery objects.
  • By going into Galleries >> Options, you may now change the gallery shortcode used for viewing a Gallery object.
  • Gallery objects now have Shiba Widgets support.
  • The “Insert into Post” button should now appear on custom post types.
  • Removed image parallelization option. As outlined in Google Page Speed, new browsers now allow more than two concurrent connections per hostname. As such, the image parallelization option is no longer needed.

Shiba Media Library 3.2

February 16th, 2011

  • Updated for WordPress 3.1, RC4. Tested on WP 3.0 and WP 3.1,RC4.
  • Fixed bulk trash operation on Gallery screen.
  • Permalinks now work properly on network activation and deactivation in WordPress Multisite.
  • Columns from other plugins are now properly added in the Media Library screen.

Shiba Media Library 3.1

January 17th, 2011

  • Updated for WordPress 3.1. Tested in WP 3.0 and WP 3.1,RC2.
  • Fixed numerous bugs in the gallery query system. Gallery types should now work properly.
  • Cleaned up the plugin so that gallery objects are now always custom post types. As a result the plugin requires WP 3.0 and above. If you are using WP 2.9, then please download Shiba Media Library 3.0.

Shiba Media Library 3.0.3

November 25th, 2010

  • Fixed bulk operations in the Google Chrome browser. Shiba Media Library now has its own menu in the media screen.
  • Cleaned up the gallery tagging system so that tagged gallery images can now be properly ordered with order, orderby, numberposts, and offset arguments. This makes it much easier to enable gallery paging.

Shiba Media Library 3.0

August 13th 2010

  • Added ability to append image tags in bulk as requested by Peder.
  • Re-enabled Insert into Post button even for images that are already attached.

Shiba Media Library 2.9

  • Shiba Media Library is now updated for WordPress 3.0. It should work in 3.0 and 2.9+.
  • All your previous gallery objects should still work seamlessly in the new update.
  • Expanded image attachment and detachment functions are now better integrated into the standard WordPress Media Library interface.
  • You may set your gallery permalink structure by going into Settings >> Permalinks
  • Fixed PHP notices. Thanks to Writemcodeboy for alerting me to this issue.

Media Library Plugin 2.7

  • Added in the ability to parallelize your image links. This enables more images to be downloaded simultaneously, and improves page speed.
  • Also fixed some bugs associated with the permalink creation function. In particular, I refined the regular expression for gallery attachment images and added more rules for validating the gallery permalink structure.

Media Library Plugin 2.6

  • As requested by Keoshi, I have added in the ability to edit your entire gallery permalink structure.

Media Library Plugin 2.5

  • I just finished making some large changes to the permalink redirect code. If you are having permalink redirect issues, in particular with your feeds, then please download the latest version.

Media Library Plugin 2.4

  • Added most-used attachment and gallery tag views.
  • Permalink support and customization for gallery objects.
  • Expanded media and gallery search.
  • Plugin is cleaner and more secure.
  • Thanks to A.M. for making many of the great suggestions that went into this plugin update.

Media Library Plugin 2.3

  • Expanded gallery objects so that they may contain posts, pages, and other gallery objects; in addition to image attachments.
  • You may now assign thumbnails to galleries. This uses the Post Thumbnail system introduced in WordPress 2.9, so you will need at least version 2.9 and a gallery front-end that knows how to render posts to fully realize the power of this feature.
  • You can now navigate to gallery objects, just like you do with attachments. Gallery object pages are rendered using the gallery shortcode.
  • ** Thanks to Keoshi for making many of the great suggestions that went into this plugin update.

Media Library Plugin 2.2

  • Fixed a bug in Release 2.1 where Trash links for posts and pages no longer work properly. This is an important bug fix so please download the latest version of the plugin.

Media Library Plugin 2.1

  • Added bulk-actions, search, and date filter to the Manage Gallery screen. Now you can perform the same menu view operations on galleries as you can with posts and pages.
  • Integrated the Manage Gallery menu with the WordPress Trash system. Now you can move galleries to the trash, untrash, or delete them permanently.
  • Fixed various bugs with gallery links, trash links, as well as image tags. The gallery and tag system should now work a lot more smoothly.

Media Library Plugin 2.0

  • Allows you to tag your images. Through tagging, you can include the same image into multiple galleries.

Media Library Plugin 1.0

  • Allows you to re-attach multiple images to any post from the Media Library panel.
  • Enables bulk image detachments.
  • Works on WordPress 2.8

Related Articles

If you enjoyed this article, please help support our site.


    • ShibaShake says

      Well, it depends on what you are trying to do. As I understand it, Network Shared Media allows you to share images across multiple blogs. That is not the function of Shiba Media Library. I list what Shiba Media does in the article above.

  1. says


    I am using Titan theme, which also use inside Shiba Media Library Plugin.
    Some time ago I start using new plugin WP/LR Sync ttp://,
    which help me to download media files directly to site from my photo archive in Lightroom. Since version 2.0 there is new great function – plugin extensions (
    which helps create collections or galleries in Lightroom and sync them with Themes/Plugins for which author has developed extension.

    There is a little supported themes/plugins, but author wrote:

    ” If you would like to have your collections available in your gallery plugin or theme through WP/LR Sync, contact your theme developer and let him know about this. I will collaborate with the developer.”

    So is it possible the author to collaborate with you, to make WP/LR Plugin extension to work with your Shiba Media Plugin? I much interested to sync collections in Lightroom directly to galleries in Shiba Media.

    If it is possible, how author of WR/LR sync can contact with you? By mail?

    Thanks a lot,

    Eugene Pugach

  2. says

    HI, I am having a problem with the shiba gallery.
    Problem is: Images dont show up at all.
    Haven’t edited the site for a while, but updated plugins and wordpress to the newest version (4.2.2.). I run Core Theme 3.4. which uses the shiba gallery.

    Already tried to deactivate all other plugins, but no result.
    I cannot add pictures – button is missing.
    Pictures show on website and are on ftp-server, but dont show up in wordpress admin.

    Will there be a bugfix? What can I do until then?
    Appreciate your help.

    • ShibaShake says

      What version of the plugin are you running? If the plugin was included with the theme, then it likely resides with the theme and is an older version.

  3. cyberfunk says

    I think I tracked the issue down to the shiba-mlib-add.php file. I compared both versions of that file from shiba media library version 3.3 and 3.9 using filemerge in Mac’s developer tools. There are significant differences between the two files which may be what was causing the button not to function correctly. I downloaded the old shiba media library version 3.3 and just uploaded shiba-mlib-add.php to the new shiba media library 3.9 replacing the newer version completely. It seems that everything works again and the button reverted to the working “Add New” version from 3.3. I can now add new images. I’m sure my website will probably explode as a result of this inelegant solution but everything is working for now.

  4. cyberfunk says

    I can’t add new images in the Gallery with WordPress 4.2.2 and Shiba Media Library 3.9. The “Upload Or Attach Images” button doesn’t function at all. I click on it and nothing happens. I reverted to WordPress 4.1.5 and Shiba Media Library 3.3 and everything works again. I inspected the button in Firefox debugger and after updating the function changes from a form with inner html

    <input id="addimage-to-gallery" class="button-secondary action" type="button" name="addimage-to-gallery" value="Add New"…

    which works beautifully to

    Upload or Attach Images…

    with no form surrounding it. This new button doesn’t work at all. I can send full before and after upgrade screenshots from the debugger if that helps.

    • ShibaShake says

      I just tested 3.9 version in Chrome and everything seems to work fine. Perhaps there is some conflict with Firefox.

  5. Dani says

    Hi —

    For some reason, when I go into a gallery and edit it, the option to upload/edit photos (at the bottom) disappears 90% of the time. When it doesn’t disappear, I click “add photos” and it freezes the page entirely.

    Am I doing something wrong? Is there a different way to edit a gallery?

    • Dani says

      Sorry, figured it out. Needed to install the latest version.

      However, another issue — is there a way to add captions to these gallery images? Can’t see how to make them appear.


  6. Amy says

    Hi there, I’m on WP 4.1.1 & having the same issue noted above. When I log into the admin, go to Galleries > Photo Gallery & click Edit I get a 404 error. It happens on the other gallery as well. I appreciate any help :)

    • ShibaShake says

      Exactly which plugin are you using? There is no Photo Gallery option in Shiba Media Library, so perhaps you are using something else.

  7. says

    I must be on another planet. I downloaded the WP Media library plugin but there is no ‘ file’ for me to upload according to your instructions. All I have is a js folder and in the Developer they are all php files. No plus zip file.

  8. Jon says

    Hi! I am trying to move from one theme to another. Right now I am using Shiba and would like to carry over my galleries based on tags to the new theme which uses another gallery plugin – WP Simple Gallery.

    Do you know of a way to have that other plugin see which images are in the Shiba Galleries? I am trying to edit the code but cannot find a solution yet.

    The code I believe I should edit is this:

    private function gallery() {
    global $post;
    $gallery = get_post_meta($post->ID, ‘wpsimplegallery_gallery’, true);
    $gallery = (is_string($gallery)) ? @unserialize($gallery) : $gallery;
    $html = ”;

    if (is_array($gallery) && count($gallery) > 0) {
    $html = ”;
    foreach ($gallery as $thumbid) {
    $html .= $this->thumb($thumbid, $post->ID);
    $html .= ”;

    return $html;

    Would appreciate any help / info, but definitely understand since it isn’t your plugin.

  9. Shahrukh Khan says

    Hi Shiba Shake,

    Thanks for Sharing an awesome post like this. It had a very good and detailed explanation

    I want my permalink to be in form of /%shop_name%/gallery/%gallery%.
    Every user has a custom user_meta = shop_name.

    Thus if my user has shop_name=shoppers stop and a gallery whose title is Washing Machine then my user URL should be http://localhost/shoppers-stop/gallery/mashing-machine

    When i go to http://localhost/shoppers-stop/gallery/I want all the galleries of shoppers-stop should be listed. Instead the index page is being shown.

    How can I make it possible?

  10. Matías says

    Hi, I have a problem with the plugin and its compatibility with wordpress 4.1. When I try to change the gallery, send me a message 404 NOT FOUND.
    You know how I fix it?
    Thank you very much.

    • ShibaShake says

      Which page sends you the 404 code? What do you mean by “change the gallery”? Do you mean change the gallery permalink? Step by step, as much detail as possible.

  11. Martin says

    hi! I’m having troubles with the Media Library for a few days. I have this error when I try to add new images to my gallery: Fatal error: Call to protected method WP_List_Table::get_column_info() from context ‘Shiba_Media_Library_Add’ in /path_to_plugins/shiba-media-library/shiba-mlib-add.php on line 185

    The error is always visible when you are editing or creating a new slide at the bottom of the page. I’m trying to disable other plugins to test but it doesn’t work.

    I had other problem like a month ago, but was solved re-installing the plugin. I tried it but doesn’t work.

    I’m using WordPress 4.1 and Shiba Media Library 3.8.2. The other plugins are Jetpack 3.3, Related Posts by Zemanta 1.11.1, SNAP 3.4.7 and WordPress SEO 1.7.1.

  12. Amir says

    Hello Shibashake
    I have a question, I will appreciate if you answer me. Few years ago I worked with blogspot. In there we could connect blogger to our picasa albums. So in editor panel when I wanted to put a image in article, It showed me albums of pictures in picasa.

    It was so nice because images from a specific article was in related album name in picasa.

    But wordpress does not have this feature, Its a mess, its a disaster. I want to see them in folders (not a gallery). Is this what your plugin do?

    Thanks for your time

Leave a Reply

Your email address will not be published.