Resource handling: add 'insert_resource_expand_to_fit()' function