Updating a modified image file across entities using it I have a content type named "Affiliate" which has among others a field storing a logotype image. The image is then displayed in a ticker (jCarousel) using a dedicated image style.

After I created one node and attached a logotype to it, I made several copies of that node, differing in text, but sharing same image. I was aware of situations where a logotype has to change but thought that solution would be "scalable" due to the fact that the image reference is shared. Now - kaboom! - the image has to be replaced with a new version. I thought I'd get away if I replaced the original image on the server and then deleted the derivative styled copies from the styles directory to make Drupal recreate them afresh. No go.

The problem is that the new image is used but with old dimensions (both in the node display and ticker), which causes distortions. I have to relink the node with the image, one by one to make it notice the new dimensions. Is the size of the original image stored somewhere in the node? What is the sneakiest way to go in such situations?
The image width and height are stored in the field tables (field_data_FIELD_NAME/field_revision_FIELD_NAME), in the FIELD_NAME_height and FIELD_NAME_width columns.

If you know the file id (fid) of the file you need to change the data for, and the width and height of your new image, you can just run the following queries against the database:

UPDATE field_data_FIELD_NAME 
SET FIELD_NAME_width = WIDTH, FIELD_NAME_HEIGHT = HEIGHT
WHERE FIELD_NAME_fid = FID

UPDATE field_revision_FIELD_NAME 
SET FIELD_NAME_width = WIDTH, FIELD_NAME_HEIGHT = HEIGHT
WHERE FIELD_NAME_fid = FID