Fixed: we can't see the svg if image not found
related
@@ -19,6 +19,7 @@ from cmsplugin_cascade.widgets import CascadingSizeWidget
from cmsplugin_cascade.link.config import LinkPluginBase, LinkElementMixin, LinkForm
from cmsplugin_cascade.utils import (compute_aspect_ratio, get_image_size, parse_responsive_length,
compute_aspect_ratio_with_glossary)
+import random
logger = logging.getLogger('cascade')
@@ -96,11 +97,7 @@ class BootstrapImagePlugin(ImageAnnotationMixin, LinkPluginBase):
return super(BootstrapImagePlugin, self).get_form(request, obj, **kwargs)
def render(self, context, instance, placeholder):
- try:
tags = get_image_tags(instance)
- except Exception as exc:
- logger.warning("Unable generate image tags. Reason: {}".format(exc))
- else:
tags = tags if tags else {}
if 'extra_styles' in tags:
extra_styles = tags.pop('extra_styles')
