I have a folder of X number of textures, I wish to render the same image X number of times, once for each texture I have a model with the material set up, but I wish to change an image texture on this model for each frame. In the past I have set up an image texture node and mix shader for each texture but this is time consuming.

I wish to automate the process a little and have it so that blender sets the number of frames to be rendered to the number of textures / image files in any chosen folder and for it to load each texture for each frame.

I believe this should be doable in python but I am rather new to scripting in python. Is anyone able to point me in the right direction for this?
Use an image sequence as input for your Image Texture node then render an animation.



When clicking the folder button in the Image Texture node to browse for files make sure you tick the option Detect Sequences to the bottom left of the File Browser.



Pick all images in the folder and set them up as an animated texture sequence, adjust the sequence speed so it matches on picture per scene frame.



You will have to make sure your image files have consistent naming and identical file format, so Blender can detect them as a sequence. That means a base name similar across all files, plus a numbering scheme. Say something along the lines of Base_File_####.extension.