The harvest_images_from_node() method returns all images from image fields and the node body, while only one is actually being used.
It is a waste of processing power to parse the node body using libxml for nodes that have image fields. I can understand that a future enhancement of this module could be that multiple og:image meta tags are returned, as Facebook supports this. In order to improve performance, and allow this future enhancement, the harvest_images_from_node() method should have a limit parameter that determines how many images are returned. For now, this limit can be hardcoded to one, but in the future this may be configurable.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jorrit’s picture

I have added patches for 6.x-1.x and 7.x-1.x that add a limit to the number of retrieved images. This saves the XML operation when the node contains image fields.

Jorrit’s picture

Assigned: Jorrit » Unassigned
Status: Active » Needs review