Image Extractor

Image extractor - plugin per wordpress
Image Extractor is a WordPress plugin that extract the first image from the post and display it. The "Image Extractor" main feature is the capability to resize the image found to a wanted size. The final image is cached in a folder, so you can obtain better performances.

How to install

  • Download the .zip file and extract it
  • Upload the extrated folder (imageExtractor/) to the WordPress plugins folder (wp-content/plugins/)
  • Configure the imageExtractor.php file and set the right cache folder. Make sure it’s writable.
  • Activate the plugin from the WordPress back office panel

How to use

Image Extractor will enable a new template function. It output a complete IMG tag to be inserted into your HTML code. The image source is retrieved from the first image found in the current post. Here is an example showing you how to use it:

<?php
  while (have_posts()) : the_post();
    image_extractor(true, 1, 395, 0, '', '', '<div>', '</div>');
    the_excerpt();
  endwhile;
?>

The syntax is:

  image_extractor($resize=false, $resize_type=1, $width='', $height='', $class='', $id='', $prefix='', $suffix='')

where:

  • resize: indicate if the plugin has to resize the image and store it in the cache folder
  • resize_type: there are 3 type of resizing:
    • 0 -> image will be resized to the new output size, regardless of the original aspectratio. (default)
    • 1 -> image will be cropped if necessary to preserve the aspectratio and avoid image distortions.
    • 2 -> image will be resized preserving its original aspectratio. differences to the new outputsize will be filled with white
  • width: the destination width. If resize is false, this property only add/change the WIDTH attribute of the IMG tag
  • height: the destination height. If resize is false, this property only add/change the HEIGHT attribute of the IMG tag
  • class: add or change the CLASS attribute of the IMG tag
  • id: add or change the ID attribute of the IMG tag
  • prefix: add a prefix to the resulting IMG tag
  • suffix: append a suffix to the resulting IMG tag

The resulting effect is cool! You can resize the post dimension as you want! Here is a screenshot!
PS: Wowww, WordPress staff has just approved my first plugin!!! I’m very very happy. You can find "Image Extractor" on the official WordPress plugin repository.resulting-effect-image-extractor

Articoli Correlati

Image Puzzle

Altro bel gioco di intelligenza a step, questa volta basato sulle immagini. L’obiettivo del gioco è trovare di volta in volta l’indirizzo della pagina successiva, cercandolo all’interno di un’immagine. Per ora sono fermo al livello 5. Sono in attesa…

Google Image al contrario!

Simpaticissimo quanto impossibile questo web gioco online. L’idea è questa: vengono presentate alcune immagini pescate da Google Image e bisogna capire in 20 secondi quale parola chiave le ha prodotte.

Image Menu: un’idea originale per un menu d’effetto

Oggi vi segnalo una libreria che vi consente di creare un originale menu di navigazione di sicuro impatto visivo. Image Menu crea un menu orizzontale composto da immagini che al passaggio del mouse scorrono allargando la voce di menu selezionata.
, , ,

Wordpress plugin: Related Post with Thumbnail

Related Post with Thumbnail is a new Wordpress plugin that returns a list of the related entries based on active/passive keyword matches and show the first available image. It can generate a custom sized thumbnail. Based on an original plugin of Alexander Malov & Mike Lu (v. 2.02)
, ,

Finalmente online l’archivio ufficiale dei Plugin di WordPress

Finalmente è stato pubblicato l’archivio ufficiale dei plugin per WordPress. A segnalarlo un post sul blog ufficiale di WordPress.Da anni esistevano directory semi-ufficiali che lo stesso wordpress.org segnalava nella sezione plugin. Dopo veloce scorsa alla nuova…
, ,


139 commenti

retrieved from the first image found in the current post. The “Image Extractor” main feature is the capability to resize the image found to a wanted size. The final image is cached in a folder, so you can obtain better performances. [Download] [Plugin Page]

02 apr 07

This is my first plugin. I hope it could be usefull for someone…

02 apr 07

eccezionale! lo cercavo da un sacco di tempo un plug-in di questo tipo. e tu lo hai creato proprio come serviva a me! :)

questo pomeriggio mi metto subito a provarlo e poi ti faccio sapere cosa ne penso!

complimenti!!

/n.

02 apr 07

Grazie Nico per l’entusiasmo… spero di non deluderti… ;-)

02 apr 07

Bravo: ora lo provo subito. Pensa che proprio la scorsa settimana stavo cercando un plugin simile. Grande! :)

02 apr 07

per funzionare, funziona. ma non riesco ad adattarlo nel plug-in che serve a me, ovvero random posts. magari lo uso in altro modo, appena mi viene in mente come. ottimo lavoro, in ogni caso!

/n.

04 apr 07

This looks really cool. When you have time you should put some help documentation for dummies (like me). I couldn’t get this working without errors. I’ll check back later.

04 apr 07

I’ve been waiting for a plugin like for a *long* time. Thanks for sharing.

What would be tremendous is to push the plugin in WPMU playground. It would be really usefull combined with “display last 10 posts from all platform” plugins.

I am actually working on a wpmu platform for radio in paris. Check out my “sand box”.

If you want to play with me with your plugin let me know and we’ll talk about that.

Thanks again

matthieu

04 apr 07

To Matthieu: in your template folder, open index.php. Walking inside the code, you’ll find the while that loop through the posts:

<?php
  while (have_posts()) : the_post();
    ...
  endwhile;
?>

Inside that loop, you can use a lot of predefined template function, such as the_excerpt(), the_post(), the_title(), etc… Installing Image Extractor, you’ll able to use a new template function: image_extractor(true, 1, 395, 0, ‘’, ‘’, ‘’, ‘’); It’s very simple and I think the plugin doen’t need more documentation. I hope this is enought. If you have any other doubts, don’t esitate to ask me. Cheers, Mikc

04 apr 07

To Matthieu (2): I’m sorry, but I don’t know WPMU. If you are able to adapt Image Extrator to WPMU, tell me how, and I’ll modify it in the SVN repo.

05 apr 07

Can we specify % values for width and height, instead of absolute values?
Thanks for this plugin :)

05 apr 07

All right Mick, I’ll try to adapt Image Extractor for WPMU and I’ll let you know.
Thks again for sharing

05 apr 07

To Srijit: You can specify % if the resize option is turned off. In case you have enable the resize=true you have to specify the exact pixels width or height or both.

05 apr 07

That is good to know. Thanks a lot :)

simple à prendre en main que les utilisateurs finaux vont *vraiment* utiliser qu’un workflow brutal comme celui de typo3 que l’on débranche 2 semaines après la mise en production parce que personne n’y comprend rien. ImageExtractor : (page plugin) [IMG ] Le plugin dont j’ai rêvé pendant un moment. Il permet de filtrer le contenu d’un post et d’en sortir la première image trouvée. Très utile pour faire des remontées de catégories en teasing sur votre page d

05 apr 07

FYI I talked about your plugin on Wordpress France
http://www.wordpress-fr.net/category/blog/

05 apr 07

Hi Mick, I’m using WordPress 2.1.2, and when I activated and used the plugin, I got the following error message in my site:

Fatal error: Call to undefined function: get_the_excerpt_reloaded() in /public_html/wp-content/plugins/imageExtractor/imageExtractor.php on line 64

What should I do?
Thanks a lot,
Sergio

06 apr 07

To Sergio: Thanks for your bug hunting. The problem is now resolved thanks to you.

To Matthieu: Woww… thanks a lot for your review in the WordPress France blog.

06 apr 07

Hello.
I didn’t get exactly where to ad the code. I’m using the cutline theme, and here is code. Can you show me where to insert the code ? Thanks !!

07 apr 07

Hi again, I downloaded the new version, activated it, and I got the error “headers already sent” in class.ImageToolbox.php. I noted that the closing “?>” tag at the end of the code was missing, I added it, and everything goes fine! :)
Thanks a lot!

07 apr 07

Thanks Sergio. The plugin was fixed thanks to you… ;-)

12 apr 07

Hello!
I’ve instaled your plugin and uploaded a ‘.jpg’ image to test it. I got the following message while the image wont show: “Fatal error: Image: Imagetype (jpg) not supported for reading. in d:\arquivos de programas\easyphp1-8\www\wp-content\plugins\imageExtractor\class.ImageToolbox.php on line 461″
Do you have a hint of the problem?

Thank you very much!

12 apr 07

Hi Gabu,
you’re right. I’ve forgot to notice that the plugin needs the GD extension.
You’ve to enable the php_gd2.so (or php_gd2.dll) inside your php.ini.

13 apr 07

Great Plugin. I got everything working, but after the thumb is created, it’s permissions are 644, so it doesn’t get displayed. Once I manually change the permissions, it shows perfectly — how can I solve this? (the thumb directly is set to 777)

16 apr 07

Ciao Mick,non riesco proprio a far funzionare il tuo plugin.in “How to use” hai riportato una parte di codice:Bisogna inserirla manualmente nel Main Index.php?o magari nel single post?
grazie j.

16 apr 07

Hi Opocaj,
the “image extractor” plugin works inside “The Loop” of WordPress. Bring your template/index.php and inside the “while” loop that cycles between the posts, you can use the image_extractor plugin. Hope this can help you,
cheers,
Mick

16 apr 07

sorry ,but i’m new to php,i’ve tried to put the code inside the loop but always get sintaz error .Can u please write me how exatly the code would be?
this is my index.php:

“>

Filed by on under || “>

thanks so much,
j.

16 apr 07

Hi Opocaj,
I’ve checked my plugin, but it seems to work. Can you detail more exactly what kind of problem you have?

16 apr 07

sorry,I’m sure your plugin works fine,maybe the problem is my knoledge of php.
this is what i’ve done:
1-in imageExtractor.php i’ve only changed the line with the ‘destination dir’ nothing else.

2-I’ve put your code in this way:

image_extractor(true, 1, 395, 0, ‘’, ‘’, ‘’, ‘’);

….

but ,when i look at the blog it doesn’t work and appear :
image_extractor(true, 1, 395, 0, ‘’, ‘’, ‘’, ‘’);
before the post.

what’s wrong?
thanks
j.

16 apr 07

Ok Opocaj,
you have to write “echo image_extractor(..);”. If it not works, check you’ve php_gd2.so enabled in your php.ini.

16 apr 07

nothing..
the php.ini seems to be ok.
i’ ve tried with echo but it doesn’t works
as you can see here: http://www.opocaj.it/opobl/
here you can also see 2 posts with the code i’m using and an extract from my php.ini.
thanks.

17 apr 07

eheh… you’ve to add the php tag (< ? and ?>) before and after any php statements. So, the result is:
< ? echo image_extractor(..); ?>
where the “…” are the function parameters. Hope this can definitely resolve your problem.

17 apr 07

Tank you very much for your patience,now it’s work!
Just one more thing:
I’ve tried it with some different size’s images
using resize_type “1″.
mostly it’s works fine but sometimes(maybe with big images) it starts to crop from the bottom or puts a black portion ,as you can see here: http://www.opocaj.it/opobl/
Maybe i’m wrong, but It could be better if it starts cropping from the center of the image.
I hope this last post will be usefull also for you,
tanks,
j.

17 apr 07

hey. I figured out the problem I was having, it was a php problem, nothing to do with your plugin. Cheers – A.

17 apr 07

For Opocaj: um…I suppose this new problem could be related to the image size. If the image is too big, the resizing may fail. Resolve this problem manually: delete the broken image from the cache folder (/opobl/thumb/thumb395×100-CHRYSLERsmall.png), and regenerate it by refreshing the page.

19 apr 07

ok thank tou for your help I’ll try to fix it
in this way,
tnx,
jacopo.

20 apr 07

Problems… I installed the plugin at my website, but everytime I set ‘true’ to ‘resize’, no image is loaded. If I set to ‘false’, it works fine. I changed the folder variable to the same folder I upload my images with wordpress, but it still does not work.
I am pretty sure the problem is with the hosting company, but I do not know exactly WHAT should I ask them to change. Any clue?

posizionamento degli annunci di google è stata molto oculata, ha seguito in dettaglio la mappa termica che google stesso mette a disposizione per migliorare i propri introiti tramite la loro pubblicità. Da segnalare Image Extractor, l’utile plug in per wordpress realizzato da Michele Gobbi per dare maggiore rilievo alle immagini in quanto vengono estratte e ridimensionate a seconda delle proprie esigenze. Nella home di dynamik.it le immagini sono di piccole dimensioni, per

22 apr 07

Hi Rafael,
I suppose your problem is due to the missing of the gd2 graphic library extension from the php ini file of your hosting server. You can check it by creating a file with this line inside: < ? phpinfo(); ?> and verify the GD2 is loaded in the php extensions.
I hope this can help you.
Mick

27 apr 07

This plugin is awesome does what I needed. Although I notice when images are posted from an external site such as image shack the image isn’t extracted. Is it something I’m doing wrong ?

30 apr 07

I would like to do this:

(your code here)

but it does not work.
what is the right function?

30 apr 07

the comment ate my php code :(

10 mag 07

I keep getting this error any help would be great.

Warning: getimagesize() [function.getimagesize]: Read error! in /home/spllogic/public_html/ctk/wp-content/plugins/imageextractor/imageExtractor.php on line 104

11 mag 07

nm I belive the problem is compatablility with 2.1.3

12 mag 07

Your download link doesn’t work.

Can’t download it

13 mag 07

For Yas V: Image Extractor works only for local images.
For Jason: I’ve tested Image Extractor on WordPress 2.1.3 and it works fine. I suppose your problem is related to bad image formats. Check if your images are a standard jpg, gif or png.

16 mag 07

hi, i am a wordpress noob. can you give me an exampel how to realize a thumb gallery like the portfolio http://www.h4×3d.com/portfolio with your plugin. i have install the plugin but it dosn’t work (i think it is my loop?)
thanx patze

24 mag 07

Ciao Mick, e complimenti per il plugin. Ho qualche problema nell’installazione: se wordpress è installato nella root, e la cartella cache (777) è /images/thumb qual è il percorso corretto nel file php? /images/thumb/ , giusto?

Ricevo questo errore:

Warning: Cannot modify header information – headers already sent by (output started at /home/../public_html/wp-content/themes/tema1/header.php:4) in /home/../public_html/wp-content/plugins/imageExtractor/class.ImageToolbox.php on line 692

24 mag 07

Ciao Franco,
sinceramente non saprei darti un aiuto. Dovresti dirmi cosa c’è alla riga 4 di header.php e la riga di codice dove invochi imageExtractor.
Ciao,
mick

24 mag 07

giusto, hai ragione. Alla riga 4 c’è il title, che ho commentato con , questa sera provo a toglierla, strana cosa. Scusa la poca dimestichezza, ma la linea 692 non c’è, puoi indicarmi cosa dovrei controllare? Grazie per il supporot :-)

28 mag 07

Hello

This is a fantastic plugin, I am using it here:
http://www.holster.co.uk/wordpress/archives/24

The only problem is that I am still getting the image shown as part of the original post. How can I only show the text of the post, or is there an equivalent ‘text-extractor’ plugin?

Basically I would like to be able to show the text and the image of a post independently, and your plugin has helped me get half way there….

03 giu 07

Una domanda: ma c’è un check circa la presenza o meno di un’immagine nel post? Perché ho un errore che parrebbe far presumere di no. :p

03 giu 07

Hai ragione. Non ho controllato, ma credo che il controllo manchi. Verifico ti faccio sapere di meglio! Ciao!

09 giu 07

You have a bug if you have a post with no images… it still tries to resize.
I added this at line 100 of image extractor.php and it seems to have fixed it:
if ($attribArr==false) return;

09 giu 07

I was also getting this error:
Warning: Cannot modify header information – headers already sent by (output

For line 692 of class.ImageToolbox.php so I simply commented it out and everything seems to work fine.

10 giu 07

Hi, when the post don’t have an image, the function image_extractor(…) outputs an img tag like this: and will display an empty image on browser. You need to check if you have an image on the post… Best regards, Cip.

11 giu 07

Ottimo plugin!! ma purtroppo mi da un errore durante la validazione.. “”
a causa dell’ 1 dopo

12 giu 07

Thanks Luke, I’ve updated the Image Extractor project with your tips and I hope many problems could be resolved.
For those who catch some problems, I suggest to download the new version.

27 giu 07

mitico plugin, purtroppo mi produce un errore di validazione xhtml per ogni immagine inserita

09 lug 07

Has anyone modified the plugin to allow for the inclusion of the extracted image an RSS feed?

17 lug 07

I am not good at php, but I founded and fixed 2 erros I was getting:
1- The generated code was showing a number one just before src, like this: <img 1 src=”file.png” width=”50″ alt=”" />
I added a str_replace to take that one out.
2- The resize method 1 was generating weird images with lots of black spaces (even with the background color was white) and with just a few pixels of the original image. I really do not know the reason for this, but I solved changing the save extension from png24 to jpg.
It is all working good now, but maybe you can find out the reason why it was acting like that. If it helps, my websites are hosted at BlueHost and the line code was identical to yours in How to Use session. Those were the only code changes I made.

18 lug 07

Hi Rafael or Mick!
I have the same problem with the cropping method 1. That’s the one I would like to use. But I get these ugly black borders, and the actual image is hardly visible (too narrow). Please send me your updated plugin, I really would like to use it here: http://bentographics.com/site/
It would be great to have an option, where the plugin should crop, i.e. center of the image, otherwise one ends up with a lot of borders and not much of the actual image or graphic you want to display as thumbnail.
Please write me, my email is on my website or use bentoenterprises {at} gmail {dot} com. Thank you lots! b

30 lug 07

Ciao, complimenti per il plug-in !! volevo segnalarti che ho inserito questo codice nell’index.php , dopo aver installato il plug-in, purtroppo però non accade nulla, le GD funzionano correttamente, puoi darmi qualche consiglio ?
Grazie mille

31 lug 07

Mi spiego meglio, inserendo il tag nel loop del file home.php ( che è poi la pagina iniziale del sito ) compare solo l’header, tutto il resto della pagina è bianca, quindi suppongo che il loop venga bloccato dal tag image_extractor..

21 ago 07

I’ve modified you plug in get a parameter that tell him to “echo” or “return” the results.
this is useful if you wanna use the URL returned in some other php function or variable.
maybe in the next version u can incorporate that.

24 ago 07

Like Robert McPeak asked, I also have a need for this sort of plugin. One reads WordPress feeds, pulls the first image out of said feed and displays the image, post title and a link from the post title to the actual post. I probably could mash one up, but if someone already invented this wheel, I’d be interested. Thanks!

Tools Combining Google Maps and Geotagged Photos” Dreamweaver Extension for Wordpress (por Vikiwords) Extensão para o Dreamweaver que pode otimiza (muito) o trabalho na construção de Temas para o Wordpress.WP Image Extractor PluginUm bom plugin para quem pensa em fazer do WordPress, o seu CMS. O Image Extractor Plugin promete automatizar uma tarefa só era possível com o uso dos custon-fieds. Ele pega a primeira imagem de seu post, redimenciona, guarda e exibe em sua

Tools Combining Google Maps and Geotagged Photos” Dreamweaver Extension for Wordpress (por Vikiwords) Extensão para o Dreamweaver que pode otimiza (muito) o trabalho na construção de Temas para o Wordpress.WP Image Extractor PluginUm bom plugin para quem pensa em fazer do WordPress, o seu CMS. O Image Extractor Plugin promete automatizar uma tarefa só era possível com o uso dos custon-fieds. Ele pega a primeira imagem de seu post, redimenciona, guarda e exibe em sua

29 ago 07

Problems installing. I am setting the php file to the correct writable folder and am attempting to install. Getting all sorts of errors once i click the “activate” button. Then i have to deactivate immediately or i have an issue with my header in the wp-admin? Anyone else run into this issue?

29 ago 07

BTW – same error as Franco. Can’t read your response…

05 set 07

Your plugin sounds great, is it possible to specify one or several categories in the function? Thx!

05 set 07

And sorry, I forgot to ask: does it work with WP 2.2.2?

[...] sono nuova. Ho recentemente installato la versione 2.2 di wordpress. Ho qualche problema con questo plugin Ho provato ad inserire il codice nel template di default, nel file index.php, ma mi è risultato [...]

06 set 07

could you tell me how to establish a permalink to PNG image?

I tried the following syntax, but I couldn’t it.
“>’,”);
?>

Thanks for this plugin.

06 set 07

could you tell me how to establish a permalink to PNG image?

I tried the following syntax, but I couldn’t it.

<?php
$posts = get_posts('numberposts=1&category=6');
foreach($posts as $post) :
setup_postdata($post);
image_extractor(true, 1, 200, 0,'img_L','','<a href="<?php the_permalink() ?>">','</a>');
?>

Thanks for this plugin.

19 ott 07

works with wordpress 2.3

22 ott 07

Hei! Thanks for your great plugin but i have a problem. It doesn´t resize the image but the GD Support er enabled and the folder has 777. Do you have any idea?

Greatings!
Meerblickzimmer

24 ott 07

Hello Mick.
I’am trying to find plugin or function, to extract an image from post, resize it, & put above the title of post in “Recent Posts” field (in the slidebar).
Is it possible to do with your script?

24 ott 07

X Meerblickzimmer: perhaps the image is too big, and the php exceed the allowed memory.
X Stanly: My plugin works exactly as you describled. Try it!!!

25 ott 07

@Mick: post_max_size = 8M or what must i check? Thanks for help! M

25 ott 07

x Mick
I tryed to install Image Extractor, but I failed… =( few strange errors appeared & I just deactivate it. Today I surf your blog & understand all usefulness and power of your plug-in. As soon as I’ll write a tutorial for you about creating headers like mine, I’ll try to install plug-in one more time… because I really need its functionality for dezignus.com, & for my future projects!
(ps. Sorry for my English, I’am Russian)

you. Today it is personal blog of Italian web observer and programmer – Mike. If you don’t understand Italian you can use Google Language Tools (as I did). About a month ago I started to communicate with him about his wonderful Word Press plugin -Image Extractor(it can extract the first image from the post and display it). I’m sure this plugin has a great potential and someday I will install it to my blog, The next great thing is his new WP Plugin Related Post with Thumbnail

02 dic 07

When I try to resize, i keep getting the following error in my log:
PHP Fatal error: Image: Outputwidth and -height must be integers greater zero

24 dic 07

How can i save the resized image in jpg ? The thumb are too big :( and is there a way to choose where crop ?

07 gen 08

Ciao Mick,

C’è un modo per fare si che l’immagine sia un link al post?

Io ho provato così:

', ''); ?>

Ma la funzione “the_permalink” non funziona (scusa il gioco di parole).

Hai qualche suggerimento?

Ciao e grazie.
Giovanni

14 gen 08

hi mick,
I’m currently using wp 2.3.2, when i enable this plugin in my sidebar this error comes out.
[quote]require_once(dddd.com/wp-content/themes/default/sidebar.php) [function.require-once]: failed to open stream: No such file or directory at dddd.com/wp-includes/theme.php (440)
timed at 14-Jan-2008 13:26:28

[/quote]
any idea guys

05 feb 08

Scusate ma a me da errore se lo metto nel mio tema. come mai?

05 feb 08

ah si io uso wp 2.3.2

18 feb 08

Great Plugin! How can you make it display a default image if it does not find an image? Thanks!

18 feb 08

Great Plugin. How do you set a default image if it doesn’t extract one?

Matt

14 mar 08

Hi there,

GREAT plugin! I use it on my own site no problems, but I’m doing a new site for someone else now and I’m getting the same error as abelafonte when I set resize to true:

Fatal error: Image: Outputwidth and -height must be integers greater zero.

…but I have them both set to 100

Also, where do I create the image cache folder? Where is the location /mat/thumb/ relative to?

®

22 mar 08

Is it possible to use this plugin to show the image from the previous or next posts? I want to do a previous and next post preview thumbnail on single view pages…

®

30 mar 08

I’m using Resize Type 1 and it’s not working correctly, as described by others. It crops the images incorrectly, leaving big black spaces.

08 apr 08

Is ImageExtractor compatible with WordPress 2.5? Thanks!

08 apr 08

I’m using it on my site with WordPress 2.5 no problem…

®

08 apr 08

ciao, il tuo plugin sarebbe per me una mano santa…se solo riuscissi a farlo funzionare! :)

questa è la funzione che scrivo:
image_extractor(true, 1, 240, 180, ‘post-image’,”, ”, ”);

ho WP 2.3.2, la cartella per le immagini è abilitata alla scrittura, ho il supporto GD sul server.
Ma con il true non mi funziona, non mi resiza le immagini e non succede nulla. Se metto false invece funziona, ma non è quello che mi serve, perchè mi stretcha le img.

Questo è ciò che scrivo nel file di configurazone della dir:
$destinationDir=”/_img/thumbs/”;

Quale potrebbe essere il problema?
Grazie in anticipo per il supporto, ciao

09 apr 08

I want to activate this plugin on localhost (wampserver), but I can not, because it gives error. How to install it?

10 apr 08

Will the “Image Extractor” plug-in be updated to address the issues with incorrect cropping (using resize type 1) and image quality? Sometimes I notice the new images are of great quality.

Looking forward to the future release!

25 apr 08

This is a great plugin. Is there anyway to make it work with the new WP2.5 gallery if there is a gallery instead of an image.

28 apr 08

good work, very much appreciated!

19 mag 08

Ciao, compliementi per il plugin. Io ho un problema, non riesco a capire perchè quando lo inserisco mi rovina tutta la disposizione del sito.

Posso collegare il plugin al codice che elenca i post recenti o quelli più letti?

Grazie Mille

Andrea

23 mag 08

I found a fix for the black areas that many of us were getting when imageExtractor improerly cropped an image. Open up ‘imageExtractor.php’. go to line 112. it should look like this:

      $thumbnail->setResizeMethod('workaround');

change it to this:

      $thumbnail->setResizeMethod('resize');

Thats it.. fixed it for me!

Thakns for this great plugin!

29 mag 08

Ciao, bellissimo plugin ma anche a me non funziona in modalità $resize=true

Credo che come gli altri amici qui sopra non sia ben chiaro se la path della cache nella configurazione debba essere assoluta a partire dalla root o relativa al template…

Potresti dirci la path corretta da configurare.

per il resto è quello che cercavo e per farti felice ti dirò di più: il tuo plugin è risolutivo per il template “Revolution”…

Grazie ancora…

Guido

23 giu 08

First: Excellent plugin, thanks a lot.

One one site (WP 2.5.0) it works nicely – but in another site (http://jonassmith.dk/weblog/, WP 2.5.1) thumbs don’t get generated. Inserting the first image without resize works fine, though.

Anyone know what might be the problem? Can it be related to the lates WP version?

(Thumb folder is fully writable).

Thanks!

- Jonas

26 giu 08

Hi this is an awsome plugin and i have managed to get it working on my site fine for images that are put up manually into each post. But i was wandering if anyone knew if there was a way of manipulating this plugin so that i can extract images from posts that use a “random Image” plugin, or if there is another plugin out there that does this. If so it would be a great help.

Cheers
Bobby

10 lug 08

i got image extractor to work without having a local location on my server, or using uploaded images. all my images are remotely hosted on photo bucket or imagshack, so basically have a “featured” sidebar with loads of images, clickable to the post itself (usually could only done by using uploaded images and plugins).

my question is, if you can incorporate this with the “relatest posts with thumbnails” plugin, it would be the best plugin ever. having related articles with thumbnails, WIHOUT having the thumbnails’s source coming from physical uploaded images. but from remote hosted images instead… if i can use “related posts to thumbnails” to call “extract_images()” as the output, it would be great, please show me how.

17 lug 08

funny. i´ve got the same problem as Jonas Smith.

Inserting the first image without resize works fine, the second image – if i have the resize option (TRUE) turned on – wont be shown. It will be empty.

WP 2.6. Any ideas?

thx

23 lug 08

This is what i have been looking for :D

24 lug 08

yea, i figured it out.

@ Jonas Smith: maybe a solution for you too! ;)

If the pictures are not saved in the original wp-content/upload/ [...] folder, image-extractor
doesn´t work. so, if your image-link in the post is something like “http://www.example.com/image.jpg”, image-extractor although work with “false”, but the crop function is disabled.

So, make sure, that your images always are linked to your upload folder! ;)

26 lug 08

hello

I’m having some trouble setting the cache folder

$destinationDir=”wpcontent/uploads/”;

what should i have here?

thanks

26 lug 08

Hi,

I would love to use this plugin but when I try to activate it (wordpress 2.5) it generates an error:

html = “”; $this->html=$htmlcode; return true; } function LoadHTML($filename) ……………..

any ideas what may be wrong? I have looked everywhere for a solution but havent found an answer… your help would be much appreciated

Thanks
I

02 set 08

Ciao, ho lo stesso problema di Io, c’è qualche soluzione a riguardo? Mi serverebbe veramente molto questo plugin….
Grazie per l’aiuto …

04 set 08

Per favore…?

01 ott 08

Question:

I’m using the plugin on a testing subdomain and when I set the first attribute to “true” none of my images will show. But when I change to false, all the images immediately show, although since I have them set to resize they are becoming a bit distorted.

I do indeed have the gd2 graphics plugin for PHP. I double checked with my host this evening.

Funny thing is, I’m using same plugin on the root domain of another site (hosted on same host) and it works fine when set to “true”.

Any suggestions?

26 ott 08

I had the same problem as Lindsey and a few others here when using the wonderful Image Extractor plugin on a Wordpress site in a subfolder.

Solution:
When entering your path in the imageExtractor.php, make sure you add the subfolder path in the beginning. For example for a site: http://www.mysite.com/subfolder and thumb-folder with correct permissions at wp-content/thumb it is:

$destinationDir=”/subfolder/wp-content/thumb

Works perfectly.

24 nov 08

I had a similar problem where resized images weren’t working, the thumbnail wasn’t being created in the cache file, when I moved hosting. I finally tracked down the problem to the plugin using DOCUMENT_ROOT which was giving the wrong result, I changed it to use PHP_DOCUMENT_ROOT and it all works fine again. Hope this info may help someone else having problems.

08 dic 08

Thanks a lot for the plugin. It modified my blog nicely.
However, you need to modify details of your plugin on wordpress site as it has the wrong syntax. imageextractor rather then image_extractor.

Cheers,

pluzz

This is a really good plugin

08 gen 09

Hey, nice plugin. But I’m confused as to how to implement this on my blog.
I’m using the livewire theme. Can you help me out?

19 feb 09

Is it possible to make this plugin work for external images ?

05 mar 09

ciao, mi scuso per l’intrusione ma ho bisogno di aiuto e sono davvero in difficoltà.
Mi spiego: fino a pochi giorni fa usavo la plugin “alakhnors-post-thumb” ma non so bene per quale motivo ha fatto esplodere il blog, ed è il caso di usare questo termine, visto che ha buttato giù il server aruba per 3 giorni :-(
Però tante mi piacerebbe avere nella sidebar sx le iconcine delle foro degli ultimi 10 post con i relativi titoli lincati.
Cosa posso fare?
Non posso permettermi di buttare di nuovo giù il server aruba, hanno minacciato di sospendere il contratto!
Questa plugin fa al caso mio ed è compatibile con WP 2.7.x?
grazie con tutto il cuore per tutto l’aiuto che riuscirai a darmi

27 mar 09

how would i make it get thumbnails from images on my category page?

18 apr 09

thnx for the plugin but how to make it to resize all images that I post from other sites not uploaded to wordpress… Can I resize that kind of images or not.. Please answer soon because I need it very much

11 mag 09

Hi,

Is there a way to override img tag attributes “alt” and “title” with the title of the post which the image is extracted from?

cheers,
valix

18 mag 09

For anyone having the problem of no images showing up, here is a possible solution (works on Mosso.com cloud hosting with Wordpress 2.7.1)

Edit the file: imageExtractor.php
Find all instances of: getenv(“DOCUMENT_ROOT”)
and replace with: $_SERVER["PHP_DOCUMENT_ROOT"]

Apparently on _some hosts_, DOCUMENT_ROOT doesn’t come through as the correct place on the server to put the files, so the plugin fails to create the thumbnails.

Stef

03 giu 09

hi

i am getting below error once i activate plugin

Fatal error: Class ‘htmlparser’ not found in D:\training\wamp\www\wordpress\wp-content\plugins\image-extractor\imageExtractor\imageExtractor.php on line 91

please help me out how to solve this issue

16 lug 09

sto avendo dei problemi a far girare il plugin su un server windows.
quando lo attivo mi appare un sacco di codice, faccio fatica a capire qual’è l’errore.
help!

il codice che mi appare è questo: html = “”; $this->html=$htmlcode; return true; } function LoadHTML($filename) { $this->html = “”; if (!file_exists ($filename)) { //return false; } //$filename=”http://www.dynamick.it”; //echo $filename.”"; $fh = @fopen (trim($filename), “r”); if ($fh!=false) { //flock($fh,2); while (!feof ($fh)) { $buffer = fgets($fh, 10240); if ($buffer!=”") { $this->html.=trim($buffer); } } //flock($fh,3); fclose($fh); return true; } else return false; } function GetElements(&$result) { if (count($this->elements)==0) { return false; $result=array(); } $result=$this->elements; return true; } function Parse() { $ignorechar = false; $intag = false; $tagdepth = 0; $line=”"; $text=”"; $tag=”"; if ($this->html==”") { return false;} $raw = split (“\r\n”, $this->html); while (list($key, $line) = each ($raw)) { $htmlline = htmlentities($line); if ($line==”") { continue; } $line = trim($line); for ($charsindex=0;$charsindex<=strlen($line);$charsindex++) { if ($ignorechar==true) { $ignorechar=false;} if (($line[$charsindex]=="elements[]=$text; $text=”"; } $intag = true; } else if (($line[$charsindex]==”>”) && ($intag)) { $tag .=”>”; /* Tag Found */ $this->elements[]=$tag; $ignorechar = true; $intag=false; $tag=”"; } if ((!$ignorechar) && (!$intag)) { $text .= $line[$charsindex]; } else if ((!$ignorechar) && ($intag)) { $tag .= $line[$charsindex]; } } } return true; } function download($file_source, $file_target) { $rh = @fopen($file_source, ‘rb’); $wh = fopen($file_target, ‘wb’); if ($rh===false || $wh===false) { return true; } while (!feof($rh)) { if (fwrite($wh, fread($rh, 1024)) === FALSE) { echo ‘Download error: Cannot write to file (‘.$file_target.’)'; return true; } } fclose($rh); fclose($wh); return false; } function getAttributes($html) { //preg_match_all(‘/(\w+\s*=\s*”[^"]*”)*|(\w+\s*=\s*\’[^\']*\’)*/’,$html,$attr); $attrWithDblQuote=’((\w+)\s*=\s*”([^"]*)”)*’; $attrWithQuote=’((\w+)\s*=\s*\’([^\']*)\’)*’; $attrWithoutQuote=’((\w+)\s*=(\w))*’; preg_match_all(‘/’.$attrWithDblQuote.’|’.$attrWithQuote.’|’.$attrWithoutQuote.’/',$html,$attr); //echo “#

“;print_r($attr);echo ”

“; if (is_array($attr)) foreach ($attr as $count=>$attrArr) { if (is_array($attrArr)) foreach ($attrArr as $i=>$a) { if ($a!=”" and $count==2) $res[$a]=$attr[3][$i]; if ($a!=”" and $count==5) $res[$a]=$attr[6][$i]; if ($a!=”" and $count==8) $res[$a]=$attr[9][$i]; } } return $res; } function linkAnalyzer($url) { $regexp = “(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?”; $regexp = “(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?”; eregi($regexp,$url,$ret); $r["url"]=$url; $r["scheme"]=$ret[2]; $r["authority"]=$ret[4]; $r["path"]=$ret[5]; $r["query"]=$ret[7]; $r["fragment"]=$ret[9]; return $r; } function getTagResource($tag=”a”) { global $elements; $tag=”elements)){ if (strtolower(substr($code,0,strlen($tag)))==$tag) { $attribArr[]=$this->getAttributes($code); } } return $attribArr; } function includeImportCss($html,$path=”",$level=1) { global $urlToGrabArr; preg_match_all(‘/@import\s[\"]*((http:\/\/[^\/]*){0,1}(.*?))[\"]{0,1};/i’, $html,$result); //echo ”
#”.dirname($path).”#

“;print_r($result);echo ”

“;die; if (is_array($result[3])) foreach ($result[3] as $k=>$v) { $url=dirname($path).”/”.$result[3][$k]; //echo “url ricavato: $url
“; if ($this->url_exists($url)) { $css=@file_get_contents($url); //die ($css); $html=preg_replace(‘/@import\s[\"]*((http:\/\/[^\/]*){0,1}(.*?))[\"]{0,1};/i’, $css, $html); //if (strstr($html,”@import”)) $html=importCss($html,dirname($result[3][$k]),$level++); } } return $html; } function url_exists($url) { $handle = @fopen($url, “r”); if ($handle === false) return false; fclose($handle); return true; } } ?>

28 lug 09

Il fix suggerito per evitare il problema di cropping funziona:

$thumbnail->setResizeMethod('workaround');

change it to this:

$thumbnail->setResizeMethod('resize');

Grazie, ottimo plugin, gira bene sulla 2.8

22 ago 09

Hi,
Image extractor is a great plugin but it doesnt currently work for my site.

What happens is that for my blog template, on each of my posts, i have a bunch custom fields, one of them is called “img” where i put the url of the image i want to be displayed in my post. However Image Extractor doesnt take images in the custom fields in consideration, because they are not actually in the of the post’s wysiwyg “content”.

The workaround for this is for me to post the image once in the wysiwyg, with a css class that hides the image, and then put the img url again in the “img” custom field that i use for my blog post templates. This is rather annoying and defeat the purpose of this plugin.

So my question is this, is there a way for Image Extractor to be aware of the images in the post that are inserted with the custom fields ???

26 set 09

Buongiorno, a me viene fuori questo errore

Warning: imagejpeg() [function.imagejpeg]: Unable to open ‘/www/www/mat/thumb/72×73-foto021-150×150.jpg’ for writing in /www/www/ivan/ivan-wordpress/wp-content/plugins/imageExtractor/class.ImageToolbox.php on line 679

non sono molto esperto non so che fare

26 set 09

Ah ho risolto, sbagliavo nel cambiare il path delle immagini /math/thumb, ora ho corretto.

02 ott 09

guys, does anybody know how to change color from “white” to another, e.g. black..?

07 ott 09

To lo, ale and anybody else who’s getting the:
html = “”; $this->html=$htmlcode; return true; } function LoadHTML($filename)
error.

Try to edit the htmlParser.php file inside imageExtractor dir and check 1st line: if it’s
<?
change it to:
<?php

This worked for me in my WAMP environment.

15 ott 09

Nonostante la sua età, funziona ancora a meraviglia!

19 ott 09

Ciao Mick, avrei da farti un domandone: è possibile integrare il plugin “NextGen Gallery” con image extractor? Le immagini che vengono caricate su nextgen hanno una cartella di destinazione finale differente (/wp-content/gallery/) rispetto a quella dell’extractor (/mat/thumb/). E’ possibile dargli in pasto anche la cartella gallery?

19 ott 09

Certo che si può, basta metter mano ad una variabile all’interno del plugin di Image Extractor. Però non conosco così bene NextGen Gallery per poter dirti che vengono caricate anche nella galleria. Ciao!

14 nov 09

hellow

how can i make the thumbnails just smaller than the original post without cropping and changing the form of the image

thx

14 nov 09

@degreef wesley: Yes, u can. U have just to change the resizing method.

11 gen 10

Hello. This may be an odd question but a situation has arisen that has made it such that I must extract/resize the first image in a post then display X number of other images as normal. My first image is being resized no problem but none of the other images show up. Can I override this by chance? Any way of showing the other images untouched?

Scrivi il tuo commento

* Nome, Email e Commento sono richiesti

Vuoi ricevere gli ultimi articoli e tenere d'occhio i commenti direttamente sul tuo PC?

Dynamick Toolbar

Potrai inoltre navigare ascoltando decine di radio on line, accedere a centinaia di TV in streaming e chattare con gli altri visitatori del sito.

Per Windows 2000/XP. No spyware!

Libere offerte di viaggio