Rewrite image URLs in node->body or node->content['body']['#value']?
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #1664686. --> Reported by: [HenryLTV](https://www.drupal.org/user/737760) >>> <p>First of all, great job on this module Wim. Very impressed with your WPO work overall, including your BS/MS work &amp; contribution @FB.</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>We are migrating our website into Drupal 6.26. We use EdgeCast for our reverse-proxy CDN and rather than re-code my existing WPO code for Drupal, I looked into using your CDN contrib module. I was glad to find that your module reproduced many of the best-practices we employ (eg. url-altering, domain sharding, cache-busting, far-future expiration, etc.). </p> <p>Installing and configuring the CDN module was a breeze. I patched Drupal Core using your patch file. Image URLs within CSS files were altered sucessfully, but for some reason Image URLs inside the node body were not being altered.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>I dug into your code and found that cdn.module::cdn_nodeapi()::line409 <code>cdn_html_alter_image_urls($node-&gt;body);</code> was not working. </p> <p>I modified the code to <code>cdn_html_alter_image_urls($node-&gt;content['body']['#value']);</code> and IMG URLs in the node body were successfully being altered. </p> <p>Being a bit new to Drupal, I'm not sure if this issue is specific to our install or an actual bug since I didn't find an existing report in the issue queue. </p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>I can submit a patch if you feel this is a bug, or else if this issue is specific to our install and nobody can replicate, then at least this may help someone else.</p> <p>Keep up the great work Wim.</p> <p>Best,<br> HenryLTV</p>
issue