0
Welcome Guest! Login
0 items Join Now

Gantry particle, I think I found an issue with imagesize

    • emperor's Avatar
    • emperor
    • Sr. Rocketeer
    • Posts: 106
    • Thanks: 1
    • Senior Web Developer & Strategy Analyst

    Gantry particle, I think I found an issue with imagesize

    Posted 2 years 10 months ago
    • I am working on a gantry particle, and stumbled upon this page: docs.gantry.org/gantry5/advanced/twig-filters

      I tried to use the imagesize property mentioned in this page, and it seems to work only that when it renders it has double double quotes.

      The TWIG code looks like that:
      <img src="{{ item.defaultImage|url }}" alt="{{ item.imageAlt }}" {{ item.defaultImage|imagesize }}>

      The code rendered in the front end looks like that:


      <img src="..." alt="..." width=""1920"" height=""810"">

      So if you notice, the width and height attribute, got two double quotes on each side, which is not valid HTML thus it doesn't work. Tried to play around a bit, but it seems that it's an issue on your end.
    • Last Edit: 2 years 10 months ago by emperor.
    • Being awesome in designing is easy.
      Bring results is the hard part.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Gantry particle, I think I found an issue with imagesize

    Posted 2 years 10 months ago
    • As that is not an RT product issue but rather an issue on Gantry 5 core itself - please report it on the Gantry 5 opensource project https://github.com/gantry/gantry5/issues .

      Regards, Mark.
    • The following users have thanked you: emperor

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.050 seconds