Skip to content

Commit

Permalink
fix attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Dec 8, 2017
1 parent a4bf095 commit e432291
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/views/responsiveImage.blade.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<img{{ $attributeString }} srcset="{{ $media->getSrcset($conversion) }}" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}">
<img{!! $attributeString !!} srcset="{{ $media->getSrcset($conversion) }}" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}">
2 changes: 1 addition & 1 deletion resources/views/responsiveImageWithPlaceholder.blade.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<img{{ $attributeString }} onload="if(!this.hasAttribute('data-sized')){this.setAttribute('sizes',Math.ceil(this.getBoundingClientRect().width)+'px');this.setAttribute('data-sized','')}" srcset="{{ $media->getSrcset($conversion) }}" onload="if(this.dataset.sized===undefined){this.sizes=Math.ceil(this.getBoundingClientRect().width)+'px';this.dataset.sized=''}" sizes="1px" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}>
<img{!! $attributeString !!} srcset="{{ $media->getSrcset($conversion) }}" onload="if(this.dataset.sized===undefined){this.sizes=Math.ceil(this.getBoundingClientRect().width)+'px';this.dataset.sized=''}" sizes="1px" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}">
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return '<img onload="if(!this.hasAttribute(\'data-sized\')){this.setAttribute(\'sizes\',Math.ceil(this.getBoundingClientRect().width)+\'px\');this.setAttribute(\'data-sized\',\'\')}" srcset="/media/2/responsive-images/test___medialibrary_original_340_280.jpg 340w, /media/2/responsive-images/test___medialibrary_original_284_233.jpg 284w, /media/2/responsive-images/test___medialibrary_original_237_195.jpg 237w, data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAia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dlQ0NS9IaHViTzFDUnVjbGxGZDNiL0xab0J3UGFxYklwbnpnWjljVjZQRDJLeFZGT3RYbnp0M1cxZzlyREQxcDhrZE5VZi8vWiI+Cgk8L2ltYWdlPgo8L3N2Zz4= 32w" onload="if(this.dataset.sized===undefined){this.sizes=Math.ceil(this.getBoundingClientRect().width)+\'px\';this.dataset.sized=\'\'}" sizes="1px" src="/media/2/test.jpg" width="340>';
<?php return '<img srcset="/media/2/responsive-images/test___medialibrary_original_340_280.jpg 340w, /media/2/responsive-images/test___medialibrary_original_284_233.jpg 284w, /media/2/responsive-images/test___medialibrary_original_237_195.jpg 237w, data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHg9IjAiCiB5PSIwIiB2aWV3Qm94PSIwIDAgMzQwIDI4MCI+Cgk8aW1hZ2Ugd2lkdGg9IjM0MCIgaGVpZ2h0PSIyODAiIHhsaW5rOmhyZWY9ImRhdGE6aW1hZ2UvanBlZztiYXNlNjQsLzlqLzRBQVFTa1pKUmdBQkFRQUFBUUFCQUFELy9nQTdRMUpGUVZSUFVqb2daMlF0YW5CbFp5QjJNUzR3SUNoMWMybHVaeUJKU2tjZ1NsQkZSeUIyT1RBcExDQnhkV0ZzYVhSNUlEMGdPVEFLLzlzQVF3QURBZ0lEQWdJREF3TURCQU1EQkFVSUJRVUVCQVVLQndjR0NBd0tEQXdMQ2dzTERRNFNFQTBPRVE0TEN4QVdFQkVURkJVVkZRd1BGeGdXRkJnU0ZCVVUvO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enhWOFVyN1U3Q1NTejAzeWd3eU5ncnpWaTY4NXpoN0t5amF6L0FKcnZYN2p3OGRVeHVCblRqUnBlMDUzcnJibFhjOWtiNG5yNGJzcEo5UXVrbmZzcW11djhIK01ZUEZ0a2wxYnNDcDZnZHErUE5QOEFESGkzNGd3R08ydFpDeEdlaHIxYjludWZVL0NWNVBvMnFvNnlvMk1OWDAzMUtGYWxWOWpPOG8yc3JicnI5eDlYbk9YMGFjS1A5bjF2YVNkbkpKV3QzUjZ0OFJ2QVVIanQ0YmFkZG9VNURZNlY1MTRqK0R1citIbDNXQ0xjMnFEb1JYdnpqOTRLbXVQbXMzQjVIdlh4ZVovV2FWSG13OVRsZCsxelpWSVlpdERuanBvamp2Z2RiWDJoeUpOZjJNY2NKWEhTcXZpdlQ0NS9IaHViTzFDUnVjbGxGZDNiL0xab0J3UGFxYklwbnpnWjljVjZQRDJLeFZGT3RYbnp0M1cxZzlyREQxcDhrZE5VZi8vWiI+Cgk8L2ltYWdlPgo8L3N2Zz4= 32w" onload="if(this.dataset.sized===undefined){this.sizes=Math.ceil(this.getBoundingClientRect().width)+\'px\';this.dataset.sized=\'\'}" sizes="1px" src="/media/2/test.jpg" width="340">';

0 comments on commit e432291

Please sign in to comment.