Attach image to post from media library
hmmm, images are only uploaded once to the library…when you are inserting an image, you are only creating a link to the image.
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.
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.
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.
Just edit it and change ‘get_setting’ by ‘get_option’
I´d like it to edit my post, no just to generate new ones.
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.
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.
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.
I hate to dig up a dead topic but I could use this feature.
I agree, this is one seriously lacking feature of the media library. This would be great to have.
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.
I added a request to the requests forum… we’ll see if it gets heard.
You can add me as someone who would like to see this fixed.
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.
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.
- The topic ‘Attach image to post from media library’ is closed to new replies.