WordPress.org

Support

Support » How-To and Troubleshooting » How do u insert multiple images into a post?, On WordPress 2.5

How do u insert multiple images into a post?, On WordPress 2.5

  • With the new wordpress, whenever u need to insert an image, you need to click on the “add an image”, then a flash will pop up for you to upload pictures. After you have done that, u need to click on gallery, and click “show’ on each photo, then click on the “insert into post” button.

    This is fine if you only add 1 or 2 image to your post, but if there is alot of image to insert, you have to go through the same process each time.

    Is there any easier way to mass insert photos?

Viewing 15 replies - 1 through 15 (of 28 total)
  • Same problem here. I opened a ticket: http://trac.wordpress.org/ticket/6454

    Maybe it gets some support…

    You can use the gallery function

    Just type [gallery] to display all the pictures you have uploaded in a batch, it worked for me.

    mnogueir : Yeah thats exactly what i think in your open ticket, still prefer the old way. Hopefully this will go through

    The [gallery] shortcode is only good if you want to show all the pictures you’ve uploaded for the post. What if you upload 1 as a header pic, 9 others as real pics and you only want to show those 9.

    There’s got to be a way to put a selection box or multi-select in the flash dialog or define which pictures you want to be in the gallery.

    You may try to use this plugin
    http://mfields.org/wordpress-plugins/mf_gallery_shortcode/
    until something else will happen in the WP code.

    First off, as a long time WP user, I want to say I am very pleased so far with 2.5. Being a full time photographer, I was inclined to upgrade for the multiple image upload feature. However, I feel that this feature, like all new features, is young and incomplete. While technically it’s exactly as advertised (you can upload multiple files at once), it’s actually likely to be more work than the old version of WP if you are uploading many images and adding titles to each image. Here’s what I think should happen:

    Step 1: Upload the images
    —they crunch, GOOD!
    Step 2: Click on each separate image to modify individual details (as you can do now)
    —OR—
    —Modify the “Apply to All” settings to create/change settings on all images in gallery at once
    Step 3: Send all images from gallery to post (formatted in the post exactly as they would be should you add them individually.)

    That’s it. Currently you have to modify each and every image one at a time, and then place them in the post one at a time. This is a huge problem if you are adding 30-50 images per post at a time as I am, especially as the post grows longer with each image insertion. We have bulk upload, now let’s get a real “BULK ADD” feature.

    Hopefully this all makes sense.

    While it is frowned upon, you can edit a core file in wp-admin to achieve what you want:

    in the file “wp-admin\includes\media.php”, look for “function media_send_to_editor($html)”.

    change the following code:

    function media_send_to_editor($html) {
    	?>
    <script type="text/javascript">
    <!--
    top.send_to_editor('<?php echo addslashes($html); ?>');
    top.tb_remove();
    -->
    </script>
    	<?php
    	exit;
    }

    to this:

    function media_send_to_editor($html) {
    	?>
    <script type="text/javascript">
    <!--
    top.send_to_editor('<?php echo addslashes($html); ?>');
    //top.tb_remove();
    -->
    </script>
    	<?php
    	//exit;
       return;
    }

    In this case, you are effectively telling the editor to stay open and returning back to the iframe code to load again. I still haven’t figured out how to hook in the code through a plugin, though.

    thanks! i implemented this, and it works like i thought it should have originally. now i can insert multiple images without the pop-up viewer closing every time. a real time-saver.

    still looking forward to an “Insert All Images” button that inserts all the images separately so i can move them around in the posts.

    Yes, “Insert All Images” button is absolutely necessary. I want to insert all of them at once and then write comments between them.

    I modified my media.php file, and though not the comprehensive solution I’d love to have eventually, it is a HUGE help and definitely speeds up posting multiple images. Thanks!

    I have multiple images in many posts on one of my blogs. I just use ftp software to create an images folder.

    Upload the image files to that folder, place a link to the image files I want on that page. Voila ! All done.

    So I could create it this way: blog_url/images/

    so a link in my blog would be blog_url/images/joe.jpg blog_url/images/marsport.jpg etc.

    You can then add text between each <,img src line.

    No need to alter the core php files.

    thank you so much!! works really well!
    It would be nice if you could click five times to insert five images, but this is reasonably well under the circumstances!

    You’re welcome. I prefer easy to impliment solutions over those solutions that take major work to accomplish. These are blogs we are working with, not engineering projects like the Panamal Canal.

    For the grouches out there: Obviously, I’m not talking about the work done on wordpress itself.

    the chunk is now:

    function media_send_to_editor($html) {
    	?>
    <script type="text/javascript">
    /* <![CDATA[ */
    var win = window.dialogArguments || opener || parent || top;
    win.send_to_editor('<?php echo addslashes($html); ?>');
    /* ]]> */
    </script>
    	<?php
    	exit;
    }

    any side effects if changed to the following?

    function media_send_to_editor($html) {
    	?>
    <script type="text/javascript">
    <!--
    top.send_to_editor('<?php echo addslashes($html); ?>');
    //top.tb_remove();
    -->
    </script>
    	<?php
    	//exit;
       return;
    }

    I tried adding just the return;

    It didn’t work on version 2.6

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘How do u insert multiple images into a post?, On WordPress 2.5’ is closed to new replies.