Bulk updating image alt and title tags I'm trying to bulk update image alt and title tags for about 1,500 images on a site.

I've tried a number of methods and I will outline them all. I've also tried with the media module enabled and disabled. I think my issue is something to do with not being able to save the changes through to the image itself.

The relevant part of my image array (the image field - called "field_meeme_image" can hold mulitple values) is as follows:

 [field_meeme_image] =&gt; Array ( 
        [und] =&gt; Array ( 
              [0] =&gt; Array ( [fid] =&gt; 131 [alt] =&gt; Test [title] =&gt; [width] =&gt; 500


Currently I am trying Devel Execute PHP to just change one node as follows:

$node = node_load(63);
$node-&gt;log = 'Test2';
$node-&gt;field_meeme_image[$node-&gt;language][0]['title'] = $node-&gt;title;
node_save($node);


Using ['und'][0]['title'] doesn't work either

I also tried using both methods from this post

And neither one worked for me. I have confirmed that VBO is working. For example if I simply set:

$entity-&gt;log = $entity-&gt;title;
node_save($entity);


The log gets changed fine but if I try:

$entity-&gt;field_meeme_image[$entity-&gt;language][0]['title'] = $entity-&gt;title;
$entity-&gt;field_meeme_image['und'][0]['title'] = $entity-&gt;title;
node_save($entity);


The change doesn't get saved.

I've even tried using a preprocess function in my template (I've tried everything I can think of)

function footheme_preprocess_node(&amp;$vars) {
    $node = $vars['node'];
    $user = $vars['user'];
    if ($node-&gt;type == 'meeme') {
    if (in_array('administrator', array_values($user-&gt;roles))) {
        $node-&gt;field_meeme_image[$node-&gt;language][0]['alt'] = $node-&gt;title;
        node_save($node);
        }
    }


This makes the change in the $node array but it doesn't actually show up as the alt tag for the image and it doesn't save.

Any help would be massively appreciated. Cheers.
Hope my below answer helps you.

if you are using Image field, then Image field provides an option to insert "Alt" and "Title" tags. When enabled, you can insert the values in the fields.
When you are saving if yourself, custom save, then the image field array needs to look something like below.

[field_image] =&gt; Array
    (
        [und] =&gt; Array
            (
                [0] =&gt; Array
                    (
                        [alt] =&gt; alt text
                        [title] =&gt; title text
                        [fid] =&gt; 12
                        [display] =&gt; 1
                        [width] =&gt; 220
                        [height] =&gt; 169
                        [description] =&gt; 
                        [upload_button] =&gt; Upload
                        [remove_button] =&gt; Remove
                        [upload] =&gt; 
                    )

            )

    )


However, the above is from the node presave, but when tested for empty values, and changing values in node presave, this worked flawless.
Try that out, curious to know why It wont work, Should be simple (If I understand this correctly :) )

Now, you also need to see at what point you want to implement it.
Node presave, node view or any other point in time.