Support » Plugin: Media Library Assistant » Batch upload of media (not bulk upload)

  • Resolved yassermkali

    (@yassermkali)


    Hi David,

    Once again, a fantastic plugin that I find essential. WordPress should just adopt it as standard component. Thank You.

    Here is the situation:

    I have few hundred product images (for Woocommerce). Each image has:
    * Its own unique file name
    * Its own unique Title, Caption, Alt Text
    * Its own Att Categories, Att tags, Product Categories and Product tags.
    (all this information/metadata is stored in a CSV table file)

    Basically, most of the metadata fields in the Upload New Media page are unique to each image. So, “bulk” upload essentially ends up having to upload images one by one, which is not only time consuming but also subject to errors.

    I wonder if there is way to do “batch” upload of the images: by reading the image data from the CSV file and populating the Upload New Media fields accordingly, for each image.

    From your documentation, it is possible to extract metadata from EXIF within the image file. But what if the information is stored in a CSV file separate from the image file?

    I hope there is a way to do this.

    Thanks for your advice.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Good to hear from you again, and thanks for the kind words.

    I regret that the current MLA version does not have any features for reading CSV files and using them to update Media Library items. It has come up before:

    Bulk Add Unique Captions

    You can find more information about a proposed solution in that topic. If you would like to pursue the proposal, let me know.

    You might also explore:

    WooCommerce Product CSV Import Suite: by Automattic

    or look into whether the functions have been added to a more recent version of WooCommerce.

    Let me know what you think. I will be traveling off-road from Saturday March 31 until Monday, April 9. I will have no Internet access during this period, and I will not have any access to my development system. I can investigate further after I return home. Thanks for your understanding and your patience.

    Hi David,

    Thank you for the reply and advice.

    MLA is a very robust, sophisticated plugin that contains many features and functionality, each of which can be a full standalone plugin by itself. It gives the idea that you are a highly intelligent person, way above the average developer.

    Personally, I don’t use the Gallery, Tag Cloud etc features. However, I am completely dependent on MLA as a Media Management System. The ability to classify and arrange media by categories and tags and being able to search and filter the media accordingly is a very unique strength of MLA; especially given that chaotic way WP dumps all media into one upload folder without any logical structure.

    So, once again, thank you for an excellent work.

    There are several WP and WC plugins for import/export of posts, products, or even an entire website. Personally, when it comes to bulk data migration, I bypass WP altogether and just download data records directly from the MySQL database.

    However, none of those plugins can import/export media only. And even if they do treat media as special type of “post”, the metadata and classification done by MLA is lost in the transmission.

    My PHP is not very good, and while a Custom Plugin is definitely the way to go, I have no idea how to do that.

    Which brings a suggestion:

    Since you already have all the knowledge and expertise and maybe 95% of the code, it would be great if you spin-off a completely new and independent plugin, and maybe call it “Advanced Media Management”. It need not include the Gallery short codes etc, and just focus only on media management and organization:

    1) Bulk or individual upload/download of media from any source to WP: from local or remote, a url, a CDN, the cloud, or even just media that has been previously transferred using FTP.

    2) Freedom of choice as to where media is stored, within or outside the upload folder, and even having some directory structure so that each type or class of media can have its own folder.

    3) Bulk upload/download of media metadata (captions, Alt Text, att. categories, att tags and other taxonomies) from a CSV located anywhere, or extracted from APTC/EXIF included in the media file. Along with mapping those data to corresponding WP fields.

    Most of this is already available in MLA.

    You may even get bolder and assert that media is not really a “post” and should not be stored in a post or post-meta table. Inclusion of media in WP seems to be an afterthought which is not well managed yet.

    Maybe a separate “media” table in the WP database, dedicated to media and its metadata.

    I can assure you that such a plugin (which you already have most of it) will rank very highly among WP plugins.

    As to my particular case, and due to urgency–I can’t believe I am doing this– I have to resort to a browser automation plugin called iMacros, which reads the metadata from the CSV file, then fill it one by one into the MLA fields inside my browser, as if filled manually by a human being. Kind of manual data entry but faster than by humans!

    Best Regards,

    Joe

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your positive MLA feedback and for the time and thought you put into your comments and suggestions; I really appreciate that. I regret that my travel schedule and the urgency of your needs caused you to pursue a more labor-intensive solution.

    You mentioned “that chaotic way WP dumps all media into one upload folder without any logical structure.” I’m sure you are aware that the Settings/Media screen gives you one other option to divide the Media Library into year and month subfolders. That’s not entirely “logical” but it is helpful because it reduces the number of altered file names due to collisions.

    In fact, the very first question I asked the developer who introduced me to WordPress years ago was “how can I store media files in a logical folder structure”. Their forceful reply – “Forget the file system. It’s a database. Use the database features to organize things and don’t worry about where the files are stored.” That led me to create MLA so taxonomies and custom fields could be used to add metadata to items.

    I certainly agree that existing export/import tools are limited at best, especially when taxonomy terms are added to the requirements. I have given a fair amount of thought to working on this and concluded that it requires more development effort than I can give it. Importing to an empty database is not too bad, but adding items and their terms to an existing, non-empty database has quite a number of special cases and requires application-specific policy decisions.

    You wrote “And even if they do treat media as special type of “post”, the metadata and classification done by MLA is lost in the transmission.” I have always thought of media items as the pre-cursor of the custom post types introduced in WP 3.0 (the first version I used). Because they were developed and hard-coded into earlier versions of WordPress they lack many features enjoyed by custom post types (taxonomy support, bulk/quick edit, etc.) and my approach has been to add these features in the most WordPress-like way possible. There are many other plugins such as NextGen Gallery and WordPress Media Library Folders that have their own database structures. I believe this is a mistake and MLA only uses database structures and functions provided by core WordPress. I recognize the benefits of either approach, but I made my choice early on.

    I have also chosen to rely on the WordPress uploader, to avoid the problems associated with plugins like Add From Server. Have a look at their Support Forum for recent developments. You proposed “Freedom of choice as to where media is stored…” This has come up before:

    Folder Management?

    I have tested MLA with several sites that used some other way to organize the uploads area. As long as the proper information is recorded in the WordPress database MLA works with non-standard folder structures. See, for example, this earlier topic:

    Thumbnails

    As you observed, MLA provides good access and mapping support for IPTC/EXIF/XMP metadata embedded in supported file types. The custom plugin I proposed would add an ability to access and map from a CSV file, with some restrictions and policy assumptions. That seemed a manageable development task I could take on.

    I hope that gives you some insight into my thinking and design decisions. I hope your browser automation plugin was a success. Thanks again for your thoughtful comments and your interest in MLA.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Batch upload of media (not bulk upload)’ is closed to new replies.