vich uploader and easy admin images not showing
I´m having a issue, if anyone know what´s happening please help,
I´m following the tutorial from (https://symfony.com/doc/master/bundles/EasyAdminBundle/integration/vichuploaderbundle.html)
I was able to upload the image, but it´s not appearing in the list view of easy-admim
it goes like this:
#easy_admin.yaml
easy_admin:
entities:
Manchete:
class: AppEntityManchete
form:
fields:
- titulo
- descricao
- link
- { property: 'arquivoDaImagem', type: 'vich_image', base_path: '%app.path.manchete_images%',
help: 'selecione uma imagem para a manchete',
, label: 'Imagem da manchete', template: 'vich_uploader_image.html.twig' }
# ...
list:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
# ...
show:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
bellow are the path to upload the file ->
#vich_uploader.yalm
vich_uploader:
db_driver: orm
mappings:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/%app.path.manchete_images%'
#services.yaml
parameters:
locale: 'en'
app.path.manchete_images: /uploads/images/manchetes
The file and the images are being uploaded to the folder:
but aren´t being displayed inside easy admin view
So it´s my first time using symfony all these related techniques, so I´m a little lost here...
thanks in advance for any reply ...
symfony image-uploading vichuploaderbundle symfony2-easyadmin
add a comment |
I´m having a issue, if anyone know what´s happening please help,
I´m following the tutorial from (https://symfony.com/doc/master/bundles/EasyAdminBundle/integration/vichuploaderbundle.html)
I was able to upload the image, but it´s not appearing in the list view of easy-admim
it goes like this:
#easy_admin.yaml
easy_admin:
entities:
Manchete:
class: AppEntityManchete
form:
fields:
- titulo
- descricao
- link
- { property: 'arquivoDaImagem', type: 'vich_image', base_path: '%app.path.manchete_images%',
help: 'selecione uma imagem para a manchete',
, label: 'Imagem da manchete', template: 'vich_uploader_image.html.twig' }
# ...
list:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
# ...
show:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
bellow are the path to upload the file ->
#vich_uploader.yalm
vich_uploader:
db_driver: orm
mappings:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/%app.path.manchete_images%'
#services.yaml
parameters:
locale: 'en'
app.path.manchete_images: /uploads/images/manchetes
The file and the images are being uploaded to the folder:
but aren´t being displayed inside easy admin view
So it´s my first time using symfony all these related techniques, so I´m a little lost here...
thanks in advance for any reply ...
symfony image-uploading vichuploaderbundle symfony2-easyadmin
What is the url for those images that appear broken?
– dbrumann
Nov 14 '18 at 21:06
does this make sense? 127.0.0.1:8000/admin/… I mean, is this the answer you @dbrumann wanted?
– Adriel Werlich
Nov 14 '18 at 22:23
I mean when you click right click on the broken image, what url does it show, i.e. where does the browser look for the image. Does it match the path? If the parameterapp.path.manchete_images: /uploads/images/manchetes
results in the url127.0.0.1/uploads/images/manchetes
then that could be the problem, as the answer by Ahmed implies, i.e. the uri_prefix should not contain the public folder.
– dbrumann
Nov 15 '18 at 12:33
1
hey @dbrumann, I followed Ahmed and worked,... just by putting the public folder in the path of the upload_destination... now, my next challenge is get the image in the controller and show in the twig template... =)
– Adriel Werlich
Nov 15 '18 at 12:39
add a comment |
I´m having a issue, if anyone know what´s happening please help,
I´m following the tutorial from (https://symfony.com/doc/master/bundles/EasyAdminBundle/integration/vichuploaderbundle.html)
I was able to upload the image, but it´s not appearing in the list view of easy-admim
it goes like this:
#easy_admin.yaml
easy_admin:
entities:
Manchete:
class: AppEntityManchete
form:
fields:
- titulo
- descricao
- link
- { property: 'arquivoDaImagem', type: 'vich_image', base_path: '%app.path.manchete_images%',
help: 'selecione uma imagem para a manchete',
, label: 'Imagem da manchete', template: 'vich_uploader_image.html.twig' }
# ...
list:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
# ...
show:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
bellow are the path to upload the file ->
#vich_uploader.yalm
vich_uploader:
db_driver: orm
mappings:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/%app.path.manchete_images%'
#services.yaml
parameters:
locale: 'en'
app.path.manchete_images: /uploads/images/manchetes
The file and the images are being uploaded to the folder:
but aren´t being displayed inside easy admin view
So it´s my first time using symfony all these related techniques, so I´m a little lost here...
thanks in advance for any reply ...
symfony image-uploading vichuploaderbundle symfony2-easyadmin
I´m having a issue, if anyone know what´s happening please help,
I´m following the tutorial from (https://symfony.com/doc/master/bundles/EasyAdminBundle/integration/vichuploaderbundle.html)
I was able to upload the image, but it´s not appearing in the list view of easy-admim
it goes like this:
#easy_admin.yaml
easy_admin:
entities:
Manchete:
class: AppEntityManchete
form:
fields:
- titulo
- descricao
- link
- { property: 'arquivoDaImagem', type: 'vich_image', base_path: '%app.path.manchete_images%',
help: 'selecione uma imagem para a manchete',
, label: 'Imagem da manchete', template: 'vich_uploader_image.html.twig' }
# ...
list:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
# ...
show:
fields:
- titulo
- descricao
- link
- { property: 'imagem', template: 'vich_uploader_image.html.twig' }
bellow are the path to upload the file ->
#vich_uploader.yalm
vich_uploader:
db_driver: orm
mappings:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/%app.path.manchete_images%'
#services.yaml
parameters:
locale: 'en'
app.path.manchete_images: /uploads/images/manchetes
The file and the images are being uploaded to the folder:
but aren´t being displayed inside easy admin view
So it´s my first time using symfony all these related techniques, so I´m a little lost here...
thanks in advance for any reply ...
symfony image-uploading vichuploaderbundle symfony2-easyadmin
symfony image-uploading vichuploaderbundle symfony2-easyadmin
asked Nov 14 '18 at 21:00
Adriel WerlichAdriel Werlich
4319
4319
What is the url for those images that appear broken?
– dbrumann
Nov 14 '18 at 21:06
does this make sense? 127.0.0.1:8000/admin/… I mean, is this the answer you @dbrumann wanted?
– Adriel Werlich
Nov 14 '18 at 22:23
I mean when you click right click on the broken image, what url does it show, i.e. where does the browser look for the image. Does it match the path? If the parameterapp.path.manchete_images: /uploads/images/manchetes
results in the url127.0.0.1/uploads/images/manchetes
then that could be the problem, as the answer by Ahmed implies, i.e. the uri_prefix should not contain the public folder.
– dbrumann
Nov 15 '18 at 12:33
1
hey @dbrumann, I followed Ahmed and worked,... just by putting the public folder in the path of the upload_destination... now, my next challenge is get the image in the controller and show in the twig template... =)
– Adriel Werlich
Nov 15 '18 at 12:39
add a comment |
What is the url for those images that appear broken?
– dbrumann
Nov 14 '18 at 21:06
does this make sense? 127.0.0.1:8000/admin/… I mean, is this the answer you @dbrumann wanted?
– Adriel Werlich
Nov 14 '18 at 22:23
I mean when you click right click on the broken image, what url does it show, i.e. where does the browser look for the image. Does it match the path? If the parameterapp.path.manchete_images: /uploads/images/manchetes
results in the url127.0.0.1/uploads/images/manchetes
then that could be the problem, as the answer by Ahmed implies, i.e. the uri_prefix should not contain the public folder.
– dbrumann
Nov 15 '18 at 12:33
1
hey @dbrumann, I followed Ahmed and worked,... just by putting the public folder in the path of the upload_destination... now, my next challenge is get the image in the controller and show in the twig template... =)
– Adriel Werlich
Nov 15 '18 at 12:39
What is the url for those images that appear broken?
– dbrumann
Nov 14 '18 at 21:06
What is the url for those images that appear broken?
– dbrumann
Nov 14 '18 at 21:06
does this make sense? 127.0.0.1:8000/admin/… I mean, is this the answer you @dbrumann wanted?
– Adriel Werlich
Nov 14 '18 at 22:23
does this make sense? 127.0.0.1:8000/admin/… I mean, is this the answer you @dbrumann wanted?
– Adriel Werlich
Nov 14 '18 at 22:23
I mean when you click right click on the broken image, what url does it show, i.e. where does the browser look for the image. Does it match the path? If the parameter
app.path.manchete_images: /uploads/images/manchetes
results in the url 127.0.0.1/uploads/images/manchetes
then that could be the problem, as the answer by Ahmed implies, i.e. the uri_prefix should not contain the public folder.– dbrumann
Nov 15 '18 at 12:33
I mean when you click right click on the broken image, what url does it show, i.e. where does the browser look for the image. Does it match the path? If the parameter
app.path.manchete_images: /uploads/images/manchetes
results in the url 127.0.0.1/uploads/images/manchetes
then that could be the problem, as the answer by Ahmed implies, i.e. the uri_prefix should not contain the public folder.– dbrumann
Nov 15 '18 at 12:33
1
1
hey @dbrumann, I followed Ahmed and worked,... just by putting the public folder in the path of the upload_destination... now, my next challenge is get the image in the controller and show in the twig template... =)
– Adriel Werlich
Nov 15 '18 at 12:39
hey @dbrumann, I followed Ahmed and worked,... just by putting the public folder in the path of the upload_destination... now, my next challenge is get the image in the controller and show in the twig template... =)
– Adriel Werlich
Nov 15 '18 at 12:39
add a comment |
2 Answers
2
active
oldest
votes
You should put your images under public folder, try this mapping configuration:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
hey @AhmedEBENHASSINE, thanks a lot... yes, now it´s working... but uri_prefix : must have single-quotes like this -> '%app.path.manchete_images%' thanks a lot...
– Adriel Werlich
Nov 15 '18 at 12:36
Hey @AdrielWerlich yes I just edited we need to add the quotes, as the doc mention here symfony.com/blog/new-in-symfony-3-1-yaml-deprecations Could do you please accept my anwser ?
– Ahmed bhs
Nov 15 '18 at 14:02
done.... :thumbsup
– Adriel Werlich
Nov 15 '18 at 16:01
add a comment |
Yes, thanks to @Ahmed suggestion, it´s showing now...
thought the uri_prefix should contain single quote marks, otherwise exception occurs...
like this:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
thanks again...
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53308630%2fvich-uploader-and-easy-admin-images-not-showing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You should put your images under public folder, try this mapping configuration:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
hey @AhmedEBENHASSINE, thanks a lot... yes, now it´s working... but uri_prefix : must have single-quotes like this -> '%app.path.manchete_images%' thanks a lot...
– Adriel Werlich
Nov 15 '18 at 12:36
Hey @AdrielWerlich yes I just edited we need to add the quotes, as the doc mention here symfony.com/blog/new-in-symfony-3-1-yaml-deprecations Could do you please accept my anwser ?
– Ahmed bhs
Nov 15 '18 at 14:02
done.... :thumbsup
– Adriel Werlich
Nov 15 '18 at 16:01
add a comment |
You should put your images under public folder, try this mapping configuration:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
hey @AhmedEBENHASSINE, thanks a lot... yes, now it´s working... but uri_prefix : must have single-quotes like this -> '%app.path.manchete_images%' thanks a lot...
– Adriel Werlich
Nov 15 '18 at 12:36
Hey @AdrielWerlich yes I just edited we need to add the quotes, as the doc mention here symfony.com/blog/new-in-symfony-3-1-yaml-deprecations Could do you please accept my anwser ?
– Ahmed bhs
Nov 15 '18 at 14:02
done.... :thumbsup
– Adriel Werlich
Nov 15 '18 at 16:01
add a comment |
You should put your images under public folder, try this mapping configuration:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
You should put your images under public folder, try this mapping configuration:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
edited Nov 15 '18 at 13:57
answered Nov 15 '18 at 3:18
Ahmed bhsAhmed bhs
8961521
8961521
hey @AhmedEBENHASSINE, thanks a lot... yes, now it´s working... but uri_prefix : must have single-quotes like this -> '%app.path.manchete_images%' thanks a lot...
– Adriel Werlich
Nov 15 '18 at 12:36
Hey @AdrielWerlich yes I just edited we need to add the quotes, as the doc mention here symfony.com/blog/new-in-symfony-3-1-yaml-deprecations Could do you please accept my anwser ?
– Ahmed bhs
Nov 15 '18 at 14:02
done.... :thumbsup
– Adriel Werlich
Nov 15 '18 at 16:01
add a comment |
hey @AhmedEBENHASSINE, thanks a lot... yes, now it´s working... but uri_prefix : must have single-quotes like this -> '%app.path.manchete_images%' thanks a lot...
– Adriel Werlich
Nov 15 '18 at 12:36
Hey @AdrielWerlich yes I just edited we need to add the quotes, as the doc mention here symfony.com/blog/new-in-symfony-3-1-yaml-deprecations Could do you please accept my anwser ?
– Ahmed bhs
Nov 15 '18 at 14:02
done.... :thumbsup
– Adriel Werlich
Nov 15 '18 at 16:01
hey @AhmedEBENHASSINE, thanks a lot... yes, now it´s working... but uri_prefix : must have single-quotes like this -> '%app.path.manchete_images%' thanks a lot...
– Adriel Werlich
Nov 15 '18 at 12:36
hey @AhmedEBENHASSINE, thanks a lot... yes, now it´s working... but uri_prefix : must have single-quotes like this -> '%app.path.manchete_images%' thanks a lot...
– Adriel Werlich
Nov 15 '18 at 12:36
Hey @AdrielWerlich yes I just edited we need to add the quotes, as the doc mention here symfony.com/blog/new-in-symfony-3-1-yaml-deprecations Could do you please accept my anwser ?
– Ahmed bhs
Nov 15 '18 at 14:02
Hey @AdrielWerlich yes I just edited we need to add the quotes, as the doc mention here symfony.com/blog/new-in-symfony-3-1-yaml-deprecations Could do you please accept my anwser ?
– Ahmed bhs
Nov 15 '18 at 14:02
done.... :thumbsup
– Adriel Werlich
Nov 15 '18 at 16:01
done.... :thumbsup
– Adriel Werlich
Nov 15 '18 at 16:01
add a comment |
Yes, thanks to @Ahmed suggestion, it´s showing now...
thought the uri_prefix should contain single quote marks, otherwise exception occurs...
like this:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
thanks again...
add a comment |
Yes, thanks to @Ahmed suggestion, it´s showing now...
thought the uri_prefix should contain single quote marks, otherwise exception occurs...
like this:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
thanks again...
add a comment |
Yes, thanks to @Ahmed suggestion, it´s showing now...
thought the uri_prefix should contain single quote marks, otherwise exception occurs...
like this:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
thanks again...
Yes, thanks to @Ahmed suggestion, it´s showing now...
thought the uri_prefix should contain single quote marks, otherwise exception occurs...
like this:
manchete_images:
uri_prefix: '%app.path.manchete_images%'
upload_destination: '%kernel.project_dir%/public/%app.path.manchete_images%'
thanks again...
answered Nov 15 '18 at 12:50
Adriel WerlichAdriel Werlich
4319
4319
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53308630%2fvich-uploader-and-easy-admin-images-not-showing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is the url for those images that appear broken?
– dbrumann
Nov 14 '18 at 21:06
does this make sense? 127.0.0.1:8000/admin/… I mean, is this the answer you @dbrumann wanted?
– Adriel Werlich
Nov 14 '18 at 22:23
I mean when you click right click on the broken image, what url does it show, i.e. where does the browser look for the image. Does it match the path? If the parameter
app.path.manchete_images: /uploads/images/manchetes
results in the url127.0.0.1/uploads/images/manchetes
then that could be the problem, as the answer by Ahmed implies, i.e. the uri_prefix should not contain the public folder.– dbrumann
Nov 15 '18 at 12:33
1
hey @dbrumann, I followed Ahmed and worked,... just by putting the public folder in the path of the upload_destination... now, my next challenge is get the image in the controller and show in the twig template... =)
– Adriel Werlich
Nov 15 '18 at 12:39