Skip to content

Instantly share code, notes, and snippets.

@kp1
Created March 5, 2015 08:34
Show Gist options
  • Save kp1/d48d7a8b3b5358c532e3 to your computer and use it in GitHub Desktop.
Save kp1/d48d7a8b3b5358c532e3 to your computer and use it in GitHub Desktop.
diff --git a/plugin/instagr.rb b/plugin/instagr.rb
index 94c9c78..1ae6627 100644
--- a/plugin/instagr.rb
+++ b/plugin/instagr.rb
@@ -24,7 +24,7 @@ def instagr( short_url, size = :medium)
# img size
size = size.to_sym if size != :medium
- maxwidth_data = {:small => 150, :medium => 306, :large => 612}
+ maxwidth_data = {:medium => 320, :large => 612}
maxwidth = maxwidth_data[ size ] ? maxwidth_data[ size ] : maxwidth_data[:medium]
# proxy
@@ -44,7 +44,7 @@ def instagr( short_url, size = :medium)
return <<-INSTAGR_DOM
<div class="instagr">
<a class="instagr" href="#{h short_url}" title="#{h @conf.to_native(json_data["title"])}">
- <img src="#{h json_data["url"]}" width="#{h width}" height="#{h height}" alt="#{h @conf.to_native(json_data["title"])}">
+ <img src="#{h json_data["thumbnail_url"]}" width="#{h width}" height="#{h height}" alt="#{h @conf.to_native(json_data["title"])}">
</a>
<p>#{h json_data["author_name"]}'s photo.</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment