How to fix InvenTree remote_image: Downloading images from remote URL is not enabled

Problem:

While trying to create an InvenTree object using a remote_image URL, you see an error message like

requests.exceptions.HTTPError: {'detail': 'Error occurred during API request', 'url': 'https://inventree-test.mydomain.com/api/company/', 'method': 'POST', 'status_code': 400, 'body': '{"remote_image":["Downloading images from remote URL is not enabled"]}', 'headers': {'AUTHORIZATION': 'Token 6daae3817756e9c1a3603b14d9582e61f50db388'}, 'params': {'format': 'json'}, 'data': {'name': 'DigiKey', 'website': 'https://www.digikey.de/', 'remote_image': 'https://logodix.com/logo/1667872.jpg', 'description': '', 'is_manufacturer': False, 'is_supplier': True, 'is_customer': False, 'currency': 'EUR'}}

Solution:

Open the InvenTree webinterface, open Server Configuration on the left

and enable Download from URL.

The setting will be effective immediately. There is no need to click any Apply button or restart the server.