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: 105
    • Thanks: 1
    • Senior Web Developer & Strategy Analyst

    Gantry particle, I think I found an issue with imagesize

    Posted 4 months 4 days 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: 4 months 4 days ago by emperor.
    • Being awesome in designing is easy.
      Bring results is the hard part.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 95774
    • Thanks: 12656
    • Web Designer/Developer

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

    Posted 4 months 4 days 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.119 seconds