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

[v3] Resized images not being served on local or production #1067

Closed
allanbreyes opened this issue Oct 20, 2015 · 7 comments
Closed

[v3] Resized images not being served on local or production #1067

allanbreyes opened this issue Oct 20, 2015 · 7 comments
Labels
Milestone

Comments

@allanbreyes
Copy link

Example Liquid HAML call (modified from portfolio project example):

{% for project in contents.projects %}
.col-sm-4.portfolio-item
  %a.portfolio-link{ href: "#portfolioModal1", data: { toggle: 'modal' } }
    .caption
      .caption-content
        %i.fa.fa-search-plus.fa-3x
    /- here:
    %img.img-responsive{ src: "{{ project.image.url | resize: '100x100' }}" }
{% endfor %}

Getting either a 400 with message: "The SHA parameter you gave is incorrect" or a 404. Am I doing something wrong?

@manuchap
Copy link
Contributor

Have you tried without the .url param?

%img.img-responsive{ src: "{{ project.image | resize: '100x100' }}" }

@did did added the issue label Oct 21, 2015
@did did added this to the 3.0 milestone Oct 21, 2015
@did
Copy link
Member

did commented Oct 21, 2015

@allanbreyes what's the HTML generated by your code? thanks!

@allanbreyes
Copy link
Author

@manuchap - without .url results in the same problem

@did - here is the HTML generated:

<div class="col-sm-4 portfolio-item">
  <a class="portfolio-link" data-toggle="modal" href="#portfolioModal1">
    <div class="caption">
      <div class="caption-content">
        <i class="fa fa-search-plus fa-3x"></i>
      </div>
    </div>
    <img class="img-responsive" src="/images/dynamic/W1siZmYiLCIvaG9tZS9hbGxhbi9Xb3Jrc3BhY2UvZW5kb3Ivc2l0ZXMvcG9ydGZvbGlvL3B1YmxpYy9wdWJsaWMvc2FtcGxlcy9wb3J0Zm9saW8vY2FiaW4ucG5nIl0sWyJwIiwidGh1bWIiLCIxMDB4MTAwIl1d/cabin.png?sha=a80b9458fcc03005">
  </a>
</div>

<div class="col-sm-4 portfolio-item">
  <a class="portfolio-link" data-toggle="modal" href="#portfolioModal1">
    <div class="caption">
      <div class="caption-content">
        <i class="fa fa-search-plus fa-3x"></i>
      </div>
    </div>
    <img class="img-responsive" src="/images/dynamic/W1siZmYiLCIvaG9tZS9hbGxhbi9Xb3Jrc3BhY2UvZW5kb3Ivc2l0ZXMvcG9ydGZvbGlvL3B1YmxpYy9wdWJsaWMvc2FtcGxlcy9wb3J0Zm9saW8vY2lyY3VzLnBuZyJdLFsicCIsInRodW1iIiwiMTAweDEwMCJdXQ/circus.png?sha=8f973b9810a6a727">
  </a>
</div>

Some other notes:

  • I know that I have ImageMagick installed correctly (resizing works in other gems/CMSes).
  • Behavior is replicated in production. I'm not sure when/where I received the 400 message... it was in some permutation of the tag inside the img src attr.
  • dragonfly.log seems to be empty? This seems like an issue... shouldn't something be logged here?
  • Nothing of importance in wagon.log - just processing of the GET request.

@allanbreyes
Copy link
Author

Actually, I'm almost positive that this is a routing issue. I'm not sure if dragonfly is getting mounted. I'm trying to just access without the SHA param, and getting a 404.

According to: https://github.com/markevans/dragonfly/blob/241a4ed802f3b612e5a00f18a50605321c9f7323/lib/dragonfly/routed_endpoint.rb#L28

I should be getting a 400, correct?

@allanbreyes
Copy link
Author

Okay, to clarify, I get a 404 when running on wagon.

When deployed to either a local or production engine (heroku), I'm getting a 400: The SHA parameter you gave is incorrect.

I think this is related to this issue: markevans/dragonfly#387

Looks like the SHA algorithm changed on a patch update? I'll try downgrading to see if it fixes it...

did added a commit that referenced this issue Oct 21, 2015
…et key used by Dragonfly in Steam directly in the locomotive config file
@did
Copy link
Member

did commented Oct 21, 2015

Wagon and Engine needs the very last commit of Steam in order to not run this issue anymore.

@did did closed this as completed Oct 21, 2015
@allanbreyes
Copy link
Author

👍 👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants