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

Image preview width and height on component does't work. #58

Open
haralake opened this issue Dec 19, 2019 · 2 comments
Open

Image preview width and height on component does't work. #58

haralake opened this issue Dec 19, 2019 · 2 comments

Comments

@haralake
Copy link

I changed Image preview width and height on image component but still using the default parameter of 100px. On frontend when i use:
{{ imageUploader.imageWidth ?: '0' }}
i get the default parameter and not that i have enter on component.

@daftspunk
Copy link
Member

This doesn't make sense because this property comes directly from the component settings

        $this->imageWidth = $this->property('imageWidth');
        $this->imageHeight = $this->property('imageHeight');

Maybe there is something wrong with the component configuration, can you paste your theme template file?

@haralake
Copy link
Author

This is my template code:

[session]
security = "user"
redirect = "login"

[myAccount]
page = "{{ :page }}"


[imageUploader]
placeholderText = "Click or drag images to upload"
maxSize = 1
fileTypes = ".gif,.jpg,.jpeg,.png"
imageWidth = 300
imageHeight = 300
imageMode = "crop"
==
<?php
function onInit()
{
........
}
?>
==
    <div class="container">
        <!-- Row  -->
        <div class="row">
            <!-- Column  -->
            <div class="col-xl-3>
                {% component 'imageUploader' %}
            </div>
            <!-- Column  -->
            <!-- Column  -->
            <div class="col-lg-8>
                
            </div>
            <!-- Column  -->
        </div>
        <!-- Row  -->
    </div>

On frontend i get the default values (100x100):
Screenshot_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants