Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main_image_url method does not return a working link for .tif files #66

Open
henrywoody opened this issue Sep 26, 2017 · 0 comments
Open
Labels

Comments

@henrywoody
Copy link
Contributor

There might also be more file extensions that do not work, which, presumably, at least include any image file types that cannot be displayed in the browser.

For sure the method works with .jpg, .png, and .svg.

A potential "solution":

if page['thumbnail'] and page['thumbnail']['source'] =~ /\.tif\.jpg/i
    page['thumbnail']['source'].sub(/lossy-page1-\d+px/, 'lossy-page1-800px')
elsif page['thumbnail']
    page['thumbnail']['source'].sub(/\/thumb/, '').sub(/\/[^\/]*$/, '')
end

However this would always be the link to the image at 800px, which might not always work...

@pietromenna pietromenna added the bug label Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants