2

I have a problem after my successful migration from D6 to D7 where all inline images are not showing. Inline images are the images that are inserted in node body.

Modules being used:

  1. Insert

  2. Custom module

This is working fine in D6 but in D7 after saving new node the image is not showing. I have to clear the cache first or resave the node in order for the inline image to show.

Steps to replicate the problem:

  1. Create a new node and save - No inline image showing.

  2. Visit old nodes - No inline image showing.

My solutions so far.

  1. drush cc all

  2. Visit the old nodes then truncate cache_field table

  3. Resave the node

Im wondering why the inline image is not showing in newly created node and for the nodes that are not visited yet.

Any thoughts?

  • 1
    the img tag is not present at all or the path to the image is wrong? – Marius Ilie Nov 13 '12 at 17:58
2
+50

1) When you are adding a new node, check the text format option under the Body field. Ensure that it has not been set to "Filtered HTML" (if you are using the Standard profile) or some other text format that will filter out HTML tags outside a preset whitelist. However, this doesn't explain as to how the image shows up on re-save.

2) Disable your custom module and try once. Ensure that it is not affecting anything. Because, Insert, by itself, seems to be okay. Just checked out this demo.

2

Its because Drupal text formatter skipping <img> tag!

  • Goto admin/config/content/formats , then configure the format.
  • At bottom , there is a tab "Limit allowed HTML tags"
  • Add <img> there

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.