{% cloudinary about.png alttext %}
Based on hexo-cloudinary by maliMirkec.
Install using npm.
npm install hexo-tag-cloudinary --save
or if you are using GitHub Packages:
npm install @outloudvi/hexo-tag-cloudinary --save
Install using yarn.
yarn add hexo-tag-cloudinary
{% cloudinary src [alt] [srcset] [class] %}
where:
- src - path to image
- alt - image title (optional)
- srcset - srcset sizes in following format
- small_width=small_cloudinary_transformation_id;big_width=big_cloudinary_transformation_id
- (empty) - no srcset
- class - custom class (optional)
In _config.yml:
cloudinary:
username: "your_user_name" # Cloudinary username
subdir: "myhexoblogimage" # sub directory for your images
default_srcset: "" # srcset by default
{% cloudinary "about.png" "My image title" "w_300,h_600,c_thumb,g_auto" "ui image" %}
<p><img class="ui image" src="https:/res.cloudinary.com/USER_NAME/image/upload/w_300,h_600,c_thumb,g_auto/ASSET_DIR/about.png" alt="My image title" ></p>
MIT