Resizing/excluding images from full text feed

I only just started with this tool today and am working with the old version of Full-Text RSS prior to buying a package of tools - I can see lots of uses for the Newspaper creator!

I want to syndicate my own content to other sites - as a service.

Some of our content has images in it. Some of those images are advertising banners. I’d like to be able to exclude those (probably by filtering all images smaller than a certain size, for example smallest dimension smaller than 270px).

At the same time, I’d like to be able to re-size larger images so that the largest dimension never exceeds, for example, 30px.

Is there any way to do this in the configuration - thinking particularly of the latest version which I will be buying in a few hours. :wink:

Thanks for the question, Andrew,

We don’t offer filtering of images based on size in the configuration file. Part of the problem is that you can embed an image in HTML without specifying its size. So your browser will only know the size once it downloads the image. In Full-Text RSS, while we try to preserver relevant images in the content, we do not download those images. So filtering based on actual image size won’t work.

But we do offer site configuration files where you can specify the class attribute of image elements you want removed. For example:

strip: //img[contains(@class, ‘advert’)]

or remove images based on file name:

strip: //img[contains(@src, ‘/ads/’)]

More information about these can be found here: http://help.fivefilters.org/customer/en/portal/articles/223153-site-patterns And you can test these with the free version too if you want to see how well they’ll work.

As for resizing images, that’s again not something Full-Text RSS can help with at the moment. I think that would be better handled by CSS on the site that will be publishing these articles, using something like the max-width property: https://developer.mozilla.org/en-US/docs/Web/CSS/max-width

Hope that’s some help.

Thanks for the info!
I will look at our images and see what can be done.

One other question, if I may.
Is it possible to add a link back to the source to the foot of each article syndicated?
On sites that we control we can add this easily using FeedWordPress but for users of our feeds on other sites, not under our control, we can’t do this.

Best wishes,

Andrew.

andrew wilson

Hi Andrew, please have a look at the config file in Full-Text RSS.

You’ll find this config option:

// Message to append (without access key)
// ----------------------
// HTML to insert at the end of each feed item when no access key is supplied.
// Substitution tags:
// {url} - Feed item URL
// {effective-url} - Feed item URL after we’ve followed all redirects
$options->message_to_append = ‘’;

So you could add something like:

$options->message_to_append = ‘

Source article

’;

Thanks very much for the help with this!

Andrew.

andrew wilson

When parsing a page with fivefilters, the image attributes width and height are preserved.

How can i change or remove these 2 attributes, width and height?

For example: the parser outputs this image:

I’d like to modify this by removing width and height attributes.

Or even better to this:

I tried using
strip: //width
strip: //height

and i do not know of a method to find any possible width value and replace it with 100%.

Alex

Hi there,

The strip directive is intended to remove elements. Here you’re trying to remove element attributes. We’ll think about a solution for this for a future release. In the mean time, here are 2 options.

If the values are always the same, you can use find_string and replace_string:

find_string: width=“800”
replace_string: width=“100%”

find_string: height=“482”
replace_string:

If they’re not, you can try renaming the attributes to something else so that your browser simply ignores them:

find_string: width="
replace_string: nowidth="

find_string: height="
replace_string: noheight="