Set default product image via REST API The Next CEO of Stack OverflowHelp using the REST api and JavaGet multiple product images using REST APIMIME type not valid when uploading image using REST APImagento2 make image base via REST APImagento2, using REST api media uploadMagento 2 : Social Login via Rest ApiHow to attach an image for a product using magento2 REST API?Error on image upload with REST apiCreate Product with image using REST APIAuto Add Product Attribute Options when Creating a new Product by Rest API
Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?
RegionPlot of annulus gives a mesh
Can you replace a racial trait cantrip when leveling up?
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
What exact does MIB represent in SNMP? How is it different from OID?
Can we say or write : "No, it'sn't"?
Why do remote companies require working in the US?
Bold, vivid family
Does it take more energy to get to Venus or to Mars?
How to solve a differential equation with a term to a power?
How to count occurrences of text in a file?
What happens if you roll doubles 3 times then land on "Go to jail?"
multiple labels for a single equation
Return the Closest Prime Number
Is micro rebar a better way to reinforce concrete than rebar?
How do I go from 300 unfinished/half written blog posts, to published posts?
Indicator light circuit
Why has the US not been more assertive in confronting Russia in recent years?
Contours of a clandestine nature
Do I need to enable Dev Hub in my PROD Org?
Can I equip Skullclamp on a creature I am sacrificing?
Written every which way
Is it possible to search for a directory/file combination?
Skipping indices in a product
Set default product image via REST API
The Next CEO of Stack OverflowHelp using the REST api and JavaGet multiple product images using REST APIMIME type not valid when uploading image using REST APImagento2 make image base via REST APImagento2, using REST api media uploadMagento 2 : Social Login via Rest ApiHow to attach an image for a product using magento2 REST API?Error on image upload with REST apiCreate Product with image using REST APIAuto Add Product Attribute Options when Creating a new Product by Rest API
I'm using Magento REST API to create products and upload images. No problems so far, but i can't find a way to set an image as the default image to be displayed on the store using the API.
Is there a way to do so without modifying magento?
I'm using Magento CE 1.9.1.0
Thanks,
api product-images rest
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm using Magento REST API to create products and upload images. No problems so far, but i can't find a way to set an image as the default image to be displayed on the store using the API.
Is there a way to do so without modifying magento?
I'm using Magento CE 1.9.1.0
Thanks,
api product-images rest
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Have you tried setting its position to 0?
– rlecaro2
Sep 7 '15 at 13:44
add a comment |
I'm using Magento REST API to create products and upload images. No problems so far, but i can't find a way to set an image as the default image to be displayed on the store using the API.
Is there a way to do so without modifying magento?
I'm using Magento CE 1.9.1.0
Thanks,
api product-images rest
I'm using Magento REST API to create products and upload images. No problems so far, but i can't find a way to set an image as the default image to be displayed on the store using the API.
Is there a way to do so without modifying magento?
I'm using Magento CE 1.9.1.0
Thanks,
api product-images rest
api product-images rest
asked Aug 26 '15 at 15:46
jinavar1jinavar1
212
212
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Have you tried setting its position to 0?
– rlecaro2
Sep 7 '15 at 13:44
add a comment |
Have you tried setting its position to 0?
– rlecaro2
Sep 7 '15 at 13:44
Have you tried setting its position to 0?
– rlecaro2
Sep 7 '15 at 13:44
Have you tried setting its position to 0?
– rlecaro2
Sep 7 '15 at 13:44
add a comment |
1 Answer
1
active
oldest
votes
This is the correct way to set the image as "base", "small", "thumbnail" or "swatch".
"product" =>
"sku" => "test",
"name" => "Test Product",
"attribute_set_id" => 4,
"price" => 84,
"status" => 1,
"visibility" => 4,
"type_id" => "simple",
"mediaGalleryEntries"=> [
"mediaType"=> "image",
"label"=> "hassel",
"types" => ["base","small","thumbnail","swatch"],
"position"=> 0,
"disabled"=> false,
"file"=> "path/to/image.jpeg",
"content"=>
"base64EncodedData"=> "base64_encoded_image",
"type"=> "image/jpeg",
"name"=> "image_name"
]
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2fmagento.stackexchange.com%2fquestions%2f80002%2fset-default-product-image-via-rest-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is the correct way to set the image as "base", "small", "thumbnail" or "swatch".
"product" =>
"sku" => "test",
"name" => "Test Product",
"attribute_set_id" => 4,
"price" => 84,
"status" => 1,
"visibility" => 4,
"type_id" => "simple",
"mediaGalleryEntries"=> [
"mediaType"=> "image",
"label"=> "hassel",
"types" => ["base","small","thumbnail","swatch"],
"position"=> 0,
"disabled"=> false,
"file"=> "path/to/image.jpeg",
"content"=>
"base64EncodedData"=> "base64_encoded_image",
"type"=> "image/jpeg",
"name"=> "image_name"
]
add a comment |
This is the correct way to set the image as "base", "small", "thumbnail" or "swatch".
"product" =>
"sku" => "test",
"name" => "Test Product",
"attribute_set_id" => 4,
"price" => 84,
"status" => 1,
"visibility" => 4,
"type_id" => "simple",
"mediaGalleryEntries"=> [
"mediaType"=> "image",
"label"=> "hassel",
"types" => ["base","small","thumbnail","swatch"],
"position"=> 0,
"disabled"=> false,
"file"=> "path/to/image.jpeg",
"content"=>
"base64EncodedData"=> "base64_encoded_image",
"type"=> "image/jpeg",
"name"=> "image_name"
]
add a comment |
This is the correct way to set the image as "base", "small", "thumbnail" or "swatch".
"product" =>
"sku" => "test",
"name" => "Test Product",
"attribute_set_id" => 4,
"price" => 84,
"status" => 1,
"visibility" => 4,
"type_id" => "simple",
"mediaGalleryEntries"=> [
"mediaType"=> "image",
"label"=> "hassel",
"types" => ["base","small","thumbnail","swatch"],
"position"=> 0,
"disabled"=> false,
"file"=> "path/to/image.jpeg",
"content"=>
"base64EncodedData"=> "base64_encoded_image",
"type"=> "image/jpeg",
"name"=> "image_name"
]
This is the correct way to set the image as "base", "small", "thumbnail" or "swatch".
"product" =>
"sku" => "test",
"name" => "Test Product",
"attribute_set_id" => 4,
"price" => 84,
"status" => 1,
"visibility" => 4,
"type_id" => "simple",
"mediaGalleryEntries"=> [
"mediaType"=> "image",
"label"=> "hassel",
"types" => ["base","small","thumbnail","swatch"],
"position"=> 0,
"disabled"=> false,
"file"=> "path/to/image.jpeg",
"content"=>
"base64EncodedData"=> "base64_encoded_image",
"type"=> "image/jpeg",
"name"=> "image_name"
]
answered Feb 5 '18 at 14:31
CharChar
13917
13917
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- 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%2fmagento.stackexchange.com%2fquestions%2f80002%2fset-default-product-image-via-rest-api%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
Have you tried setting its position to 0?
– rlecaro2
Sep 7 '15 at 13:44