The same code is used in ImageTagBlockProcessor, ImageContainerBlockProcessor and ImageInline pattern. This is redundant and could lead to mistakes when updating these processors, so should moved to another function which each of the processors can call.
The repeated code is at least the following:
external_path_match = re.search(r'^http', file_path)
if external_path_match is None: # internal image
self.required.add(file_path)
file_relative = True
extra_args.update(image_file_name_components(file_path))
else:
file_relative = False
extra_args['full_file_path'] = file_path
extra_args['file_relative'] = file_relative