You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't tested this super extensively, but my parse-transform.js and main.js is identical to the one in this repo and I think I found a bug. I might just be a huge noob and if so, please disregard this.
If you create an image with both a src and a title, it'll get wrapped in a figure as per line 16 in parse-transform.js. But as it also gets processed by main.js line 14, ultimately the image src gets set to null and no image is shown. If an image has a title, it'll only show if you manually set the data-src to the image path as the data-src is used to set the src in main.js when lazyloading the images.
If a user uses a CMS, like Netlify CMS to manage the content they'll need to manually write image paths instead of using a WYSIWYG editor, so I think it would be better to read the src attribute instead and set the data-src based on that.
The text was updated successfully, but these errors were encountered:
I haven't tested this super extensively, but my
parse-transform.js
andmain.js
is identical to the one in this repo and I think I found a bug. I might just be a huge noob and if so, please disregard this.If you create an image with both a src and a title, it'll get wrapped in a figure as per line 16 in parse-transform.js. But as it also gets processed by main.js line 14, ultimately the image src gets set to
null
and no image is shown. If an image has a title, it'll only show if you manually set the data-src to the image path as the data-src is used to set the src in main.js when lazyloading the images.If a user uses a CMS, like Netlify CMS to manage the content they'll need to manually write image paths instead of using a WYSIWYG editor, so I think it would be better to read the src attribute instead and set the data-src based on that.
The text was updated successfully, but these errors were encountered: