Is it possible to have Img_assist use a thumbnail on a preview page but show the preview or larger picture that is on a page or story node?

Comments

benshell’s picture

Status: Active » Postponed

Unfortunately that's not possible, at least for now, because of the way Drupal caches nodes. The only way (that I can think of) to make this possible is with AJAX. Instead of having img_assist insert an IMG tag, it would insert a SPAN tag and attach a javascript to it which would call a another PHP using AJAX to retrieve the image tag (and other HTML code) appropriate for the current page view. I'm thinking about implementing something like this in the next major verison of img_assist, which will probably be called something else and do a lot more than inline images (inline image galleries, random images, inline polls, etc).

darren oh’s picture

The image module does this somehow.

sun’s picture

Title: Thumbnail to full image » Support for separate image sizes for teaser and body
Version: 4.7.x-1.x-dev » 6.x-3.x-dev

http://drupal.org/node/137960 has been marked as duplicate of this issue

Encarte’s picture

How come the Image module can do this, but not the Image assist module? Shouldn't the Image assist module be able to provide all the features of Image module and plus?

sun’s picture

This is because Image Assist filters the content of a node. Due to Drupal core's filter system, there is no contextual information passed to a input filter implementation. So Image Assist does not know whether the currently parsed inline tag will be displayed in a teaser or in a full node view. Also, AFAIK, there's just one filter cache - so once an image in a node is rendered for teaser view, it will be cached and displayed for the full node view, too.

Image is able to differentiate between these views, because images are nodes, and nodes are rendered separately for teaser and full view.

This is something that #220157: Implement Inline API will need to handle.

Encarte’s picture

I see... So, the solution for this problem is in the Inline API. Thank you (and http://www.unleashedmind.com) very much, I hope that API comes out soon.

jonathan1055’s picture

subscribing

sun’s picture

Status: Postponed » Closed (won't fix)

I'm marking this won't fix now. We may revisit this issue in Inline API at a later point in time. But for now it just adds cruft to the queue.