Active
Project:
Image
Version:
7.x-1.x-dev
Component:
image.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2024 at 14:17 UTC
Updated:
29 May 2024 at 14:19 UTC
Jump to comment: Most recent
I am using a file upload field; if the field is image type, then I want to create an image style. I have installed the twig tweak module. But still does not work. using a view to call file fields and view template
{% if file_exr == 'mp4' %}
<video width="100%" height="auto" controls>
<source src="{{ fields.field_upload_file.content }}" type="video/mp4">
</video>
{% else %}
<img src="{{ fields.field_upload_file.content|image_style('medium') }}">
{% endif %}
Comments
Comment #2
rahuldrupadev commented