This one drove me crazy. When I would post my models that I created in Blender and exported as OBJ files, people would complain that the textures weren’t included. And they were right.
I have found the solution. Before you export the file, use the “Pack All Into .blend” function. This can be found in the menu. Click File – External Data – Pack All Into .blend.
Then use the export OBJ function and enable OBJ Objects, Obj Groups and Material Groups.
Note that this will not export all the material settings you set in Blender. The OBJ files are limited.
The file will now attach the diffuse map to he OBJ file with the UV map.
The model in the screenshot above is a cactus that I created from photogrammetry. It is available on CGTrader (https://www.cgtrader.com/3d-models/plant/pot-plant/potted-cactus). If you want to support this blog, consider purchasing the model.