I try to custom the tex with image block and write a for loop below. But it can’t be saved due to the error: Liquid syntax error (line 195): Expected close_square but found pipe in “{{block.settings[“image_” | append: i] }}”
Rather than trying to append the index of the for loop within the square braces, I would seperate them out first by assigning an index variable by itself, then using that variable within your square braces.
{% for i in (1..5) %}
{%- assign image_key = “image_” | append: i -%}
{%- assign image_position_key = “image_position_” | append: i -%}
{%- assign content_key = “content_” | append: i -%}