WordPress.org

Ready to get started?Download WordPress

Forums

Attach image to post from media library (20 posts)

  1. shovetheriver
    Member
    Posted 5 years ago #

    Is there a way to attach(not insert) an image to a post without having to upload it but selecting it from the medialibrary. I have a lot of posts that use the same image.

  2. viceng
    Member
    Posted 5 years ago #

    hmmm, images are only uploaded once to the library...when you are inserting an image, you are only creating a link to the image.

  3. ptvguy
    Member
    Posted 5 years ago #

    Yes, you just keep choosing it from the media library to insert it into your post. The problem is that it won't become part of the gallery for any post except for the first one it was uploaded on. That means that it won't show up if you try to use the gallery shortcode or any plugins, themes, or templates that make automatic use of the gallery images from specific posts.

  4. shovetheriver
    Member
    Posted 5 years ago #

    Well I made a work around I just upload the images to a folder on the server and then use custom fields to point to them and build this in my templates. It works great as long as you have just a couple, like 10, of images. Otherwise it would be difficult to remember those names.

  5. mayid
    Member
    Posted 5 years ago #

    I´m uploading images by ftp. And then using a plugin to enter them into the library like attachments.

    The plugin also generates the html tag for each picture, and thumnbnails if required.

    It´s a very simple php file. Maybe we can work on it to solve some extra needs.

    http://www.internetvibes.net/wordpress-plugins-and-themes/wordpress-plugin-image-gallery-post-generator/

    Just edit it and change 'get_setting' by 'get_option'

    I´d like it to edit my post, no just to generate new ones.

  6. viceng
    Member
    Posted 5 years ago #

    you can also use a plugin like nextgen gallery

  7. jhsu79
    Member
    Posted 5 years ago #

    I really like the idea of using the media library to manage images and then using the [gallery] shortcode.

    I installed Cleaner Gallery which helps a lot to fill in the shortcomings of the shortcode, but I'm having the same issue as above.

    Sometimes when I upload a batch of images within the post it doesn't get attached to the post's gallery so when I go to use the shortcode nothing appears.

    There's no way to attach the images to the post through the media library, so I have to delete the images and try uploading them again and hope they get attached properly. I think if WordPress expects the media library and gallery codes to be a standard function they need to patch some holes before people can use them consistently.

  8. jhsu79
    Member
    Posted 5 years ago #

    I figured out how to make sure the image is attached to the post's gallery on upload, you have to make sure the post is published first and it will be included in the post's gallery.

    Still, being able to attach a file through the media library would be really helpful and extend the function of the gallery shortcode greatly, it would mean you could put your shortcode in there and then swap images in and out of the post's gallery by attaching it or not through the media library.

  9. johncoswell
    Member
    Posted 5 years ago #

    I second that, I'm using attachments in a programmatic way much more lately and having them automatically attach to the post that they're being uploaded from would make my life a lot easier.

  10. Bios Element
    Member
    Posted 4 years ago #

    I hate to dig up a dead topic but I could use this feature.

  11. Matthew Meyer
    Member
    Posted 4 years ago #

    I agree, this is one seriously lacking feature of the media library. This would be great to have.

  12. ptvguy
    Member
    Posted 4 years ago #

    If I write a series of posts on one subject or idea and use the same image on all of these posts to visually tie them together, that image will only exist in the gallery of the first post in that series. I have to reupload it (the exact same image) in each post as a separate file to make it appear in the gallery of each post. That is an unnecessary use of resources on both the server and the client ends. We need a way to use the media library to attach a single image to as many posts or pages as we want.

  13. Matthew Meyer
    Member
    Posted 4 years ago #

    I added a request to the requests forum... we'll see if it gets heard.

  14. kingkong954
    Member
    Posted 4 years ago #

    You can add me as someone who would like to see this fixed.

  15. gasgarage
    Member
    Posted 4 years ago #

    Me too. I have tried many gallery plugins but no one has this funcion.
    Attaching same file/image to multiple posts is a need for me.

    I've found this man has developed something like that but has not released it yet.
    skyphe file gallery

    I'd like there was a kind of widget for post/page editor to simply attach & deattach files.

  16. jimmit
    Member
    Posted 4 years ago #

    There is a way to attach it if it is unattached. Go to the media library then click to show only unattached. You can now attach via the Bulk Actions dropdown or individual attach links.

    I really need to be able to change the page an item is attached to though. That should really be part of the media library.

  17. Clicknathan
    Member
    Posted 4 years ago #

    Yep, Jimmit's right. Great addition.

  18. calanan
    Member
    Posted 4 years ago #

    Thanks for the tip, jimmit!

  19. Aesqe
    Member
    Posted 4 years ago #

    Thanks for posting a link to my plugin, gasgarage :)

    The plugin is in a stable state now and undergoing testing.
    I'll probably release it into the repository next week or the week after.

    Among other features, it offers detaching attachments from posts/pages, and also copying attachments from one post to another.

    Please check it out and let me know how it works for you:
    http://skyphe.org/code/wordpress/file-gallery/

    Thanks! :)

  20. rptizzle
    Member
    Posted 4 years ago #

    Hi everyone, nice thread.

    I have been playing around with some plugins for a slideshow and two of the best plugins I've found use the Media Library to make it work. And they require that the image be attached to the right page/post. It took me hours to figure out and realize that it was NOT the plugin that was broken and that this is a shortcoming of the WordPress Media feature. I'm unable to take full advantage of these plugins because of the inability to attach an image to multiple pages/posts.

    As the first poster mentioned, I need to upload every image to be able to link them. This is very cumbersome. Moreover, I do not have some of the images locally; they exist only in my WP database. That means I need to save the image before I can upload it... a very inefficient process indeed.

    So I have a few requests to those who can help:

    1) I am willing to help fix this issue whether it's coding, writing documentation, etc. I just don't know who to talk to. My email is jayricardoparker@gmail.com.
    2) Please, point me to the right people who can do something about this and I'll send them a request as well as offer my services. I'd love to see a new version of WP released with an improved feature for Media that addresses this issue.

    Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic