Could you explain to me how the minimum images size heuristics are meant to work?

Class and ID selection are not working for me, but really if the file resolution parts worked I could eliminate the envelope.png that is plaguing my imageless feeds.

Comments

publicmind’s picture

Assigned: Unassigned » publicmind
Category: support » feature

Hi,

As mentioned in the feed settings, the imagegrabber selects the largest image between the selected tag, which is <body> if none is selected. However, it is also bounded by a minimum resolution, which has been arbitrarily set to the resolution of (100 x 150).

You can try to change it to suit your needs. In function feedapi_imagegrabber_download_image_heuristics($image_url, &$imagesize)

//Minimum resolution of 100x150
    if ($resolution < 15000 || $resolution < $imagesize) {    //increase or decrease the minimum resolution here.
	return FALSE;
    }

This won't solve you problem, if the largest image on the page is the unwanted image. It will only solve the problem, if the largest image on the page is below this resolution.

I think I should add this feature to imagegrabber, where the minimum resolution can be set while enabling imagegrabber on a per feed basis.

publicmind’s picture

so that i remember, maximum size should also be configurable so that we can avoid the logo images of the website or other big images.

publicmind