The behavior:
I've got a fellow administrator that LOVES the Custom Image Sizes in Image Assist and uses it extensively when posting stories (http://stoves.bioenergylists.org/) usually has some pretty good examples. We use the html option, so his code typically looks something like this:

Only local images are allowed.Roweto 8

The problem: Seemingly at random, when you look at the story with that code, the image disappears but the title remains.

Things I know to be true -
1. the image still has the same name, and is still in that location on the server (even the version with .img_assist_custom.jpg appended)
2. this only affects images inserted with custom sizing
3. removing the height and width tags does Not fix the problem

The only reliable " fix" i've found has been to edit the tag manually so that the ".img_assist_custom" is removed from the file location:

e.g.
Only local images are allowed.

I'm using Drupal 5.6, Image 5.x - 1.6 and Image Assist 5.x 1.5. I mostly just use the core modules with the exception of one of my sites that uses i18n, but this error occurs on all 4 of my sites on a semi-regular basis, even the ones without i18n.

I checked the backlog of issues, and haven't seen this one, although it's happened to me several times -- the timing has always seemed somewhat random to me, and it's taken me a long while to figure out what the conditions are.

After checking the other issues -- it sounds a lot like the one where the custom images were disappear when the image module thumbnails were rebuilt -- although I haven't been able to track it down to something that reliable. But after living with the problem randomly occurring for over a year, and through a few module upgrades, I think it may be related. Like, for some reason that image assist custom things aren't being refreshed when they are supposed to. I've sort of held my breath through a couple of site changes that required that action -- but I've been disappointed because I haven't been able to "break" custom images on purpose that way.

And I was thoughtless, and fixed everything, so I don't have a good example, otherwise I'd paste in a URL.

I guess I'm just wondering if anyone else has noticed the same behavior and whether I'm missing something obvious or not.

Thanks for your help, time, attention, etc. We're a little no-profit and we couldn't survive without all of the hard work y'all do.

Comments

em_rasmussen’s picture

Rats! The I forgot to input the code properly.

So -- the first example was:
<span class="inline inline-left"><a href="/en/node/1971"><img src="http://www.bioenergylists.org/files/images/Raweto 008.img_assist_custom.jpg" alt="Roweto 8" title="Roweto 8" class="image image-img_assist_custom" width="401" height="301" /></a><span class="caption" style="width: 399px;"><strong>Roweto 8</strong></span></span>

and my "fix" (snipped to the relevant line):
<a href="/en/node/1971"><img src="http://www.bioenergylists.org/files/images/Raweto 008.jpg" alt="Roweto 8" title="Roweto 8" class="image image-img_assist_custom" width="401" height="301" />

I hope there is a fix that fixes it -- instead of just breaking the custom image sizing to show the image.

sun’s picture

Status: Active » Postponed (maintainer needs more info)

2 questions:

- Is this happening with other images that do not have spaces in their filename, too?

- Are those disappearing images perhaps displayed in two contents, but using a different custom size?

em_rasmussen’s picture

So this is a good example of a node with the problem:
http://gasifiers.bioenergylists.org/node/602

There seems to be no correlation between spaces in the file name and the problem.

the node/602 code has no space and it's the following code:
<span class="block"><a href="/node/601"><img src="http://gasifiers.bioenergylists.org/files/images/camerapic028.img_assist..." alt="Jackson Gasifier and Farmall H" title="Jackson Gasifier and Farmall H" class="image image-img_assist_custom" width="400" height="300" /></a><p class="caption"><strong>Jackson Gasifier and Farmall H</strong></p></span>

The disappearing images are usually only displayed once in a single story, with only one custom size. The only other sizes are the standard thumbnail and the original size.

Thanks for taking a look.

em_rasmussen’s picture

well, the example above, really should have a space in the name. I'll look for another example.

sun’s picture

From the above output, it seems that you have customized the output of Image Assist. Please ensure that the bug you are describing here does not occur if you are (temporarily) commenting out your customized code. (I hope you properly used a theme override function)

em_rasmussen’s picture

I have checked the custom code issue, in fact that was one of those things I was suspecting first. It's a manual edit, and the problem seems to be astonishingly impartial about whether it affects the unmodified image_assist html or the one with the customized span tag.

em_rasmussen’s picture

Here's a good example of a node with broken images, and no space in the file name:

http://www.bioenergylists.org/en/ecocinaenero08

the code:
<span class="block"><a href="/en/node/1977"><img src="http://www.bioenergylists.org/files/images/ecocinaa.img_assist_custom.jpg" alt="Nuevo Diseno Ecocina" title="Nuevo Diseno Ecocina" class="image image-img_assist_custom" width="400" height="302" /></a><span class="caption" style="width: 398px;"><strong>Nuevo Diseno Ecocina</strong></span></span>

I've got co-moderators who are chomping at the bit to 'fix' the images, and I'm hoping this stays broken long enough for you to take a look at it.

em_rasmussen’s picture

Status: Postponed (maintainer needs more info) » Active
em_rasmussen’s picture

Is there a way to rebuild the image_assist_custom version of the images, in the same way that you rebuild the thumbnails and other image sizes in the image module?

I tried using "rebuild thumbnails" for the affected images, which will work for images of a "regular' size, but it seems to have no affect on the ones set with custom sizing.

In fact, if there is any regularity to this problem at all, it seems to have to do with when the derivative images are built. Is it possible that the custom image assist image just isn't being rebuilt -- or there is something within this part of the code that is causing the problem? This is starting to hit where I'm ignorant, I'd love to be able to analyze it myself, but when I look at it I'm still getting really confused.

em_rasmussen’s picture

Status: Active » Postponed (maintainer needs more info)
em_rasmussen’s picture

Category: support » feature

Well, I can't leave my examples broken any longer, the guy in charge of the site is starting to get frustrated, so I'm going to make this a feature request instead.

Some way of forcing the regeneration of derivative images in image-assist, particularly that custom image size one, would be nice. A button would be fantastic, but even slightly h@x0red method and directions in the readme text would meet my needs.

Thanks for the consideration.

sun’s picture

Component: Miscellaneous » Code
Status: Postponed (maintainer needs more info) » Active

As of now there is no way to re-generate all custom size images. Image module does not know of them. Image Assist creates custom derivative images, if they do not already exist. So, if those images are deleted, they /should/ be automatically re-generated upon node view.

However, Image Assist does not store information about image sizes in the database. I could only think of adding a new action to Image Assist which recursively deletes all *.img_assist-custom.* files in the files directory. That would be a bit crude...

em_rasmussen’s picture

The same weird error happened again today. The images don't show up in the nodes, even though they exist in the directory. In fact, I can download and view them in the directory. I noticed that the image module thumbnails have the same problem that started at the same time. They also exist. I can re-generate custom image sizes in administer>content. That's what put the idea in my head.

I really like using image assist, but I've turned off the custom image sizing on all of the new sites that I install, because it's really time-intensive to track down and manually fix each broken image. This has happened now 3 times in the last 2 months, which is frustrating.

sun’s picture

Can you please ensure that the described bug is not related to http://drupal.org/node/216978 ?

sun’s picture

Category: feature » bug
Status: Active » Postponed (maintainer needs more info)

Also, please update to the most recent official release of Image assist and report back if that fixed your issue, thanks.

sun’s picture

Status: Postponed (maintainer needs more info) » Fixed

Without further information I have to guess this issue has been fixed. Feel free to report back or even re-open this issue if it has not.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

zbabyface’s picture

Version: 5.x-1.5 » 5.x-1.0
Status: Closed (fixed) » Active

I am having the same issue and have Image Assist installed!!!!

sun’s picture

Status: Active » Closed (fixed)

Also, please update to the most recent official release of Image assist and report back if that fixed your issue, thanks.

zbabyface’s picture

I had already done that....and didn't work :(

jamesfk’s picture

Version: 5.x-1.0 » 6.x-2.0-alpha4
Status: Closed (fixed) » Active

I've just experienced this exact same issue on the currently supported version for Drupal 6.

All images that where uploaded a few months ago using the custom size option have vanished from the files directory, though the original source image in each case remains.

It looks as if some Drupal housekeeping process has removed the files as perhaps they were not registered in the file system database anywhere?

Has anybody else experienced this issue? Otherwise there is a ticking time bomb here for custom sized inserted images...