jekyll-plugin-cloudinary 1.14.2 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jekyll/cloudinary/version.rb +1 -1
- data/lib/jekyll/cloudinary.rb +8 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bbeeb0360e827069b6757f2072800c1b27c76b70d8b739f35f4c8e5eb765d87
|
4
|
+
data.tar.gz: ed9a6c144944747216fad276b73eea031f1b8d2aedde07a7abe22867da904f79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1aae7da8b9b2704625e23e154f2708d8f73f66d6639bc4eeaca86d89ecb64b3c650c8642a00c4a6cc247d19b00663c29eea065a6d143f760e6e6cdf553b254a9
|
7
|
+
data.tar.gz: ec46383dfac0efb558a31a6849529ee1149e2eb4b2f1d73e613ad1084a7d2768a9f1e7cc1ea16494ef8408844c80ac907b1d4fdd5cb11429718058406094f3e5
|
data/lib/jekyll/cloudinary.rb
CHANGED
@@ -212,9 +212,15 @@ module Jekyll
|
|
212
212
|
# It's remote
|
213
213
|
image_dest_path = image_src
|
214
214
|
image_dest_url = image_src
|
215
|
-
|
215
|
+
if ENV["JEKYLL_ENV"] != "production"
|
216
|
+
natural_width, natural_height = nil
|
217
|
+
else
|
218
|
+
natural_width, natural_height = FastImage.size(image_dest_url)
|
219
|
+
end
|
216
220
|
if natural_width.nil?
|
217
|
-
|
221
|
+
if ENV["JEKYLL_ENV"] == "production"
|
222
|
+
Jekyll.logger.warn("remote url doesn't exists " + image_dest_url)
|
223
|
+
end
|
218
224
|
return "<img src=\"#{image_dest_url}\" />"
|
219
225
|
end
|
220
226
|
width_height = "width=\"#{natural_width}\" height=\"#{natural_height}\""
|