Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

attach (embed) linked post images to the post WordPress

  • SOLVED

what's the easiest (or better) way to attache/embed images to multiple posts that already is displaying the post images using < img> tags (images were uploaded in bulk per hundreds to the same server/site using ftp not the image uploader), my problem is that since I did not use the image uploader or media library to upload the images, I can not generate thumbs, see the images in the media library or view use the images as you can with regular images attached toposts...

Answers (6)

2010-07-31

Ryan Riatno answers:

You can use [[LINK href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/"]]timthumb[[/LINK]], and here's the tutorial to integrate it with [[LINK href="http://c.hadcoleman.com/2008/06/adding-timthumb-to-your-wordpress-theme/"]]wordpress[[/LINK]].


Ryan Riatno comments:

Or you can use [[LINK href="http://justintadlock.com/archives/2008/12/21/get-the-image-plugin-update-a-better-image-script-for-wordpress"]]get the image plugin[[/LINK]] from Justin Tadlock.


william galindo comments:

I already have the images uploaded to the server via ftp, the post is displaying the image, and I tried your solution before but it does not attach the images to the post or list the images to the media library and I need that as input for a couple of plugins (gallery, mediarss, template etc)

2010-07-31

Mike Schinkel answers:

@William,

If I understand correctly the problem is you have the images located on your web server but the WordPress media library doesn't know anything about them, right? If I understand correctly and you don't run into any version trouble one of these plugins may give you what you need:

[[LINK href="http://wordpress.org/extend/plugins/add-from-server/"]]http://wordpress.org/extend/plugins/add-from-server/[[/LINK]]
[[LINK href="http://wordpress.org/extend/plugins/add-linked-images-to-gallery-v01/"]]http://wordpress.org/extend/plugins/add-linked-images-to-gallery-v01/[[/LINK]]

If this doesn't meet your needs please let me know more details so I can give you a better answer.

-Mike


william galindo comments:

yes that is my problem, I will check that alternative, the "linked images to gallery" seems like what I need, I installed and activated the plugin, but so far is doing nothing :( I'll keep trying to see if I find what's wrong


Mike Schinkel comments:

@William: Can I assume you are on WordPress 3.0?
In what directory on your server are your images located?

2010-07-31

Lew Ayotte answers:

Are the images available on the server? Like: http://newdomain.com/imagedir/image.jpg ?

If so, you can run a Search and Replace plugin search for the old URI and replace with the new URI...

I.E.

Search: http://olddomain.com/olddir/oldir/olddir/
Replace: http://newdomain.com/newdir/

Make sure you backup the DB first.

Lew


Lew Ayotte comments:

This is the plugin: http://wordpress.org/extend/plugins/search-and-replace/


william galindo comments:

yes images are available in the same server/domain but I don't have the post in a wp database I have a csv files to create the post (there is data to replace)


Lew Ayotte comments:

You could just do a search/replace in the CSV files... using NotePad++ (or something similar).

2010-07-31

Deepak Thomas answers:

Based on your question, I guess WP Gallery does not know which post is associated with which image, right?
Could you clarify if you want a specific image for a specific post OR any random image from the directory would do for every post?


william galindo comments:

right, the post data already have <img> tags linking to images in the same saver and is displaying but" the WP Image Library(gallery as you say) does not list the images and plugins don't track the images as attached to the post


Deepak Thomas comments:

Could you tell me for what purpose you need them in the Library (attached to the post)? Coz if it's just to find which image, we could easily write a plugin/function to parse the < img > src attribute and give you the URL.
Would that do?


william galindo comments:

Is a long histor I want to embed the images in the post to be able of generate navite wp30 thumbnails,I'm building an image portafolio, the template is already creating and parsing the image using the plugin "Simple Post Thumbnails" I can tweak the code to use a custom field or the excerpt but I need to output only the thumbnail in my rss feed (no the main image not the details), I already have a plugin that create the feed using the thumbnails (I'm using big images for that reason use the regular feed does not work since, the thumbnails are the right size for mobile browsers.
I know that other alternative is to hire somebody to code a custom rss that show my custom field but I lack the resources or knowledge to do it my self, for that reason, embed the images and generate the thumbs manually looks to my like the easiest option (I'm open to other ideas)

2010-07-31

Nile Flores answers:

When you mass uploaded... Did you follow the uploads folder format?

Example

Upload to:

wp-content/uploads/2010/07/

(since it was the 7th month uploading)

???

If you did not... try it that way and see if the images show up in the media library.

2010-07-31

Naif Amoodi answers:

As pointed out earlier, http://wordpress.org/extend/plugins/add-linked-images-to-gallery-v01/ should take care of what you are after.

You basically have something which looks like <img src="http://www.example.com/image.jpg" alt="" /> in your post, correct? If yes then that plugin should do the trick. But if it doesn't, please check if whether you are using a valid <img /> tag? Maybe you are using an HTML <img> instead of an XHTML complaint <img />? If yes then probably that plugin doesn't support tags which are closed using an HTML fashion.