-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added partial support for retina images #30
base: develop
Are you sure you want to change the base?
Conversation
Instead of changing our main functions to give support to other plugins we should consider adding new functions to extend our main functions. We could also have a look at filters to add this support. |
I think this functionality should be core for our plug-in. Cropping images is our core business, so cropping retina images as well. |
$imageFilePath | ||
); | ||
// Loop trough all the image qualities (normal & retina) | ||
foreach ($imageFilePaths as $retina => $imageFilePath) { |
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.
as $imageSize => $imageFilePath
|
||
// Add the retina image if it exists (We're using 2 instead of @2x for multiplications) | ||
if (file_exists($uploadDir . $retinaFileName)) { | ||
$imageFilePaths['2'] = $uploadDir . $retinaFileName; |
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.
$images[] = [
'src'=> 'path....',
'multiply'=> '1' // or 2
]
No description provided.