Commits

tehfink  committed 6214432

added image dimensions to templates

  • Participants
  • Parent commits b922280
  • Branches cms-2.X
  • Tags cms-2.0.2

Comments (0)

Files changed (2)

File cmsplugin_photologue/templates/plugins/cmsplugin_photologue/photologue_gallery.html

             <div class="gallery-photo">
 
                 <img src="{{ photo.get_thumbnail_url }}" alt="{{ photo.title }}"/>
+                <img
+                    src="{{ photo.get_thumbnail_url }}" width="{{ pic.get_thumbnail_size.0 }}" height="{{ pic.get_thumbnail_size.1 }}"
+                    alt="{{ photo.title }}"
+                />
 
             </div>
 
 
         <div class="gallery-photo">
 
-            <a href="{{ photo.get_absolute_url }}"><img src="{{ photo.get_thumbnail_url }}" alt="{{ photo.title }}"/></a>
+            <a href="{{ photo.get_absolute_url }}">
+                <img
+                    src="{{ photo.get_thumbnail_url }}" width="{{ pic.get_thumbnail_size.0 }}" height="{{ pic.get_thumbnail_size.1 }}"
+                    alt="{{ photo.title }}"
+                />
+            </a>
 
         </div>
 

File cmsplugin_photologue/templates/plugins/cmsplugin_photologue/photologue_photo.html

 
             <span>{{ photo.title }}</span>
 
-            <img src="{% ifequal is_thumb '1' %}{{ photo.get_thumbnail_url }}{% else %}{{ photo.get_display_url }}{% endifequal %}" alt="{{ photo.title }}"/>
+            <img
+                {% ifequal is_thumb '1' %}
+                    src="{{ photo.get_thumbnail_url }}" width="{{ pic.get_thumbnail_size.0 }}" height="{{ pic.get_thumbnail_size.1 }}"
+                {% else %}
+                    src="{{ photo.get_display_url }}" width="{{ pic.get_display_size.0 }}" height="{{ pic.get_display_size.1 }}"
+                {% endifequal %}
+                alt="{{ photo.title }}"
+            />
 
         </a>
 
 
     <div class="gallery-photo{% if css %} {{ css }}{% endif %}">
 
-        <a href="{{ photo.image.url }}"><img src="{% ifequal is_thumb '1' %}{{ photo.get_thumbnail_url }}{% else %}{{ photo.get_display_url }}{% endifequal %}" alt="{{ photo.title }}"/></a>
+        <a href="{{ photo.image.url }}">
+
+        <img
+            {% ifequal is_thumb '1' %}
+                src="{{ photo.get_thumbnail_url }}" width="{{ pic.get_thumbnail_size.0 }}" height="{{ pic.get_thumbnail_size.1 }}"
+            {% else %}
+                src="{{ photo.get_display_url }}" width="{{ pic.get_display_size.0 }}" height="{{ pic.get_display_size.1 }}"
+            {% endifequal %}
+            alt="{{ photo.title }}"
+        />
+
+        </a>
 
         {% if photo.caption %}<p>{{ photo.caption }}</p>{% endif %}