Refactored the markup logic such that the insert_markup method now accepts an optional is_file_path argument
Created a get_template function for getting the correct template, differentiating between the processing that needs to be done for file paths and other inputs like Base64 or URLs.
Summary of changes
insert_markup
method now accepts an optionalis_file_path
argumentget_template
function for getting the correct template, differentiating between the processing that needs to be done for file paths and other inputs like Base64 or URLs.