Skip to content

Commit

Permalink
fix(runtime): use file name from src if alt prop is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Oct 3, 2020
1 parent 6174417 commit 19e6157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/nuxt-image-mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default {
},
computed: {
imgAttributes () {
const alt = this.alt ? this.alt : this.alt.split(/[?#]/).shift().split('/').pop().split('.').shift()
const alt = this.alt ? this.alt : this.src.split(/[?#]/).shift().split('/').pop().split('.').shift()
return {
alt,
referrerpolicy: this.referrerpolicy,
Expand Down

0 comments on commit 19e6157

Please sign in to comment.