Skip to content

Fluid style for images with normal markdown syntax #501

Closed Answered by h-enk
mfasold asked this question in Support
Discussion options

You must be logged in to vote

Other option, copy node_modules/@thulite/images/layouts/_default/_markup/render-image.html and paste (override) to /layouts/_default/_markup/render-image.html. Add to the latter class="{{ site.Params.thulite_images.defaults.class }}":

{{- /* Render image element. */ -}}
<img
  src="{{ $r.RelPermalink }}"
  class="{{ site.Params.thulite_images.defaults.class }}"
  width="{{ string $r.Width }}"
  height="{{ string $r.Height }}"
  decoding="{{ site.Params.thulite_images.defaults.decoding }}"
  fetchpriority="{{ site.Params.thulite_images.defaults.fetchpriority }}"
  loading="{{ site.Params.thulite_images.defaults.loading }}"
  alt="{{ .PlainText }}"
  {{- with .Title -}}title="{{ . }}"{{- end 

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@h-enk
Comment options

@mfasold
Comment options

@h-enk
Comment options

Answer selected by mfasold
@mfasold
Comment options

Comment options

You must be logged in to vote
2 replies
@h-enk
Comment options

@mfasold
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants