anti_image_reflow 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 625940c619a2c4df8177c33bd88901b03f3c67a0f431d58f7820002dafb6490f
4
- data.tar.gz: 9a9265a9f862e0ebfa48ba3ac848c0b20e1de83d4f7af92f162ba009b2b98db7
3
+ metadata.gz: a1f68e7bff3b9ffd205ffcb6c763135c1b735cfec4839059566d72df8e81e647
4
+ data.tar.gz: 272389f6c519a74c5980458ef3e68806077fa45f1e4900fbdc6a3920f2569afc
5
5
  SHA512:
6
- metadata.gz: e7559ed4e5e86084d45d07609b31848d47d891c1990a8416fe01618c5cce7508ef4e97d8801912f65364d308e96a51b792dc557fb566aef6d793e69f90e91044
7
- data.tar.gz: 16bd6e80c2cbed711fabf2ff00e3c1667c0a882cc7864000ac769001ac966fc72f8789ce98b18b02b6b6804c0cea67f6d40a104239227baf3e538eafa66ee9b7
6
+ metadata.gz: 45af988ffb21e51b5084a20aee82a6710a10510a45985638ac8deb0edf5de15c3c73e98a0e6ff0eb0259a155d639f1c910b099131ef1b45d9a0de49f0d4b7075
7
+ data.tar.gz: 73a7aec115296337a22d36b7c301312ef873a19ec3735ace2fa14b418d1d37a2e1fefa1314d50cfb1096f93034ed501118af27c2127823784046dfd5a4835112
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AntiImageReflow
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -28,14 +28,10 @@ module Jekyll
28
28
  tags.each do |tag|
29
29
  # add height and width attributes
30
30
  if tag.name == "img"
31
- path = File.join(Dir.pwd, tag["src"])
32
- # check file is not directory
33
- if File.file?(path)
34
- size = FastImage.size(path)
35
- tag["width"] = size[0] unless tag["width"] || size.nil?
36
- tag["height"] = size[1] unless tag["height"] || size.nil?
37
- tag["loading"] = "lazy" unless tag["loading"]
38
- end
31
+ size = FastImage.size(tag["src"])
32
+ tag["width"] = size[0] unless tag["width"] || size.nil?
33
+ tag["height"] = size[1] unless tag["height"] || size.nil?
34
+ tag["loading"] = "lazy" unless tag["loading"]
39
35
  end
40
36
  end
41
37
  content.to_html
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anti_image_reflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Smith