Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glide does handle unsupported file formats. #2122

Closed
wants to merge 3 commits into from
Closed

Glide does handle unsupported file formats. #2122

wants to merge 3 commits into from

Commits on Jul 22, 2020

  1. Glide does handle unsported file formats.

    Glide is a great tool to resize images, but can't handle some file formats like SVG files. It does make sense. Why would you want to resize a SVG image?
    
    This PR does make it possible to pass any kind of image to glide. Should a specific format be not supported, glide will return the original path and the image would be shown in every case. 
    
    A common use case will make this more clear. 
    ```
    // Instead of 
    {{ customers }}
        {{ if logo:extension !== "svg" }}
            <img src="{{ glide:logo width='165' quality='100' }}">
        {{ else }}
            <img src="{{ logo }}">
        {{ /if }}
    {{ /customers }}
    
    // You can do
    {{ customers }}
        <img src="{{ glide:logo width='165' quality='100' }}">
    {{ /customers }}
    ```
    Jonas Siewertsen authored Jul 22, 2020
    Configuration menu
    Copy the full SHA
    36426d8 View commit details
    Browse the repository at this point in the history
  2. Formatting

    Jonas Siewertsen authored Jul 22, 2020
    Configuration menu
    Copy the full SHA
    4ca0794 View commit details
    Browse the repository at this point in the history
  3. More formatting

    Jonas Siewertsen authored Jul 22, 2020
    Configuration menu
    Copy the full SHA
    0927c14 View commit details
    Browse the repository at this point in the history