Skip to content

Commit

Permalink
Update output file path too if full-res image was found
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelienpierre committed Dec 3, 2024
1 parent b12f255 commit 29f397b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wp2hugo/internal/hugogenerator/hugo_gen_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ func (g Generator) downloadPageMedia(outputMediaDirPath string, p *hugopage.Page
// If full-res image not found, try again with resized one.

media, err = g.mediaProvider.GetReader(link)
} else {
// If full-res image found, update target file path too
outputFilePath = _resizedMedia.ReplaceAllString(outputFilePath, "$1.$2")
}

if err != nil {
Expand Down

0 comments on commit 29f397b

Please sign in to comment.