Reply to comment

You have a node type containing an image field. You want to construct a feed containing the image (and node title) but the image needs to be resized to a format you dont use on the site.

Here is how to do it:

Use imagecache module
Create a preset.
Construct the url where the image would be if the image cache module would generate it. This is the url you will put in your feed.
But why would I put an url in my feed to an image that doesnt exists? If the url where the image is supposed to be is called the image cache module will generate the image.
To discover the path where the image cache module will create your image, simply run print theme('imagacache', 'preset', $node->path_to_your_image) in your node tpl and check out under files/imagecache where the image was created.

This looks all very logical but calling to a path where no image exist isnt very intuitive you would expect the image to be created first by calling the theme('imagecache', ..) function. But it isnt. Just call the "would be" path and your fine.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><img><p><b><i><table><th><tr><td><blockquote><br /><img /><tbody><span><strike>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <codes>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.