Save all images using names of materials I have an imported model I'm working with. The materials by default are named something like 054fF0_c. I usually rename all of these in blender to something that makes more sense. I would like to then 'Save all images' of the opened images in the UV editor window but I want them to have the names that I assigned in the material tab and not suggest the original name that's not my assignment. Is there a way to already accomplish this? I'm not a programmer by the way.
The following script should resave your images the way you want. Copy and paste this into blenders text editor and click Run Script.

If the same image is used by multiple materials, it will save a copy of the image for each material but only one will be used for all materials.

import bpy
import os

editor = bpy.context.screen.areas[1]
old_type = editor.type
editor.type = 'IMAGE_EDITOR'
override = bpy.context.copy()
override['area'] = editor

def rename_image(img, mat_name, img_count):
    editor.spaces.active.image = img
    fp = bpy.path.abspath(img.filepath)
    pardir = os.path.dirname(fp)
    sufx = fp.split('.')[-1]
    if img_count &gt; 1:
        img_name = mat_name + '_' + str(img_count)
    else:
        img_name = mat_name
    img.name = img_name
    new_path = os.path.join(pardir, img_name + '.' + sufx)
    bpy.ops.image.save_as(override, filepath=new_path)

for mat in bpy.data.materials:
    mat_imgs = 0
    if mat.use_nodes:
        nt = mat.node_tree.nodes
        for n in nt:
            if n.type == 'TEX_IMAGE':
                mat_imgs += 1
                rename_image(n.image, mat.name, mat_imgs)
    else:
        for s in mat.texture_slots:
            if s is not None and s.texture.type == 'IMAGE':
                mat_imgs += 1
                rename_image(s.texture.image, mat.name, mat_imgs)

editor.type = old_type