-
Notifications
You must be signed in to change notification settings - Fork 886
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
Fix+Chore: Remove crop directives from community post's images #3734
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works but the code looks strange
Also as additional notes I found an answer about this cropping directives removal
https://webapps.stackexchange.com/questions/91659/how-to-view-the-full-background-image-of-a-youtube-channel
In case anyone interested (which at least there would be the future version of myself)
@@ -111,7 +111,8 @@ export default defineComponent({ | |||
return Number.parseInt(b.width) - Number.parseInt(a.width) | |||
}) | |||
|
|||
return imageArrayCopy.at(0)?.url ?? '' | |||
// Remove cropping directives when applicable | |||
return imageArrayCopy.at(0)?.url?.replace?.(/-c-fcrop64=[\w,]+/i, '') ?? '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove excess ?.
return imageArrayCopy.at(0)?.url?.replace?.(/-c-fcrop64=[\w,]+/i, '') ?? '' | |
return imageArrayCopy.at(0)?.url?.replace(/-c-fcrop64=[\w,]+/i, '') ?? '' |
3793ffd
to
776d02f
Compare
Just to clarify, these images have a slightly different link format, they're unamed images.
If someone who's more confortable with UIs would like to mess around with that, by all means. |
776d02f
to
1c07e49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with https://www.youtube.com/channel/UC8ZItosWC34jdsiPjX11CXA again
Pull Request Type
Description
A picture speaks a thousand words.
Screenshots
Before:
After:
Desktop
development
(ca08562)