Skip to content

Image attribute type import issue #9171

Closed
@jroca22

Description

@jroca22

I've created a custom image attribute and added to my attribute set as image. The thing is that when you try to import the attribute the same way you import images vis csv it only writes the value as text.

Preconditions

Magento 2.2.0

Steps to reproduce

  1. Create a custom image attribute and add it to your attribute set (new_image)
  2. Go to any product of that attribute set and assign the attribute to any image
  3. Export that product it and see the value of the new_image attribute on additional attributes
  4. Now let's say you want import a new image and assign to that image the new_image attribute. Let's say the image name is image01.jpg and it has been uploaded to pub/media/import
  5. On the csv change the value of new_image=image01.jpg and add image01.jpg to additional images.
  6. Import the csv and set the path to /pub/media/import

Expected result

  1. Now if you export the same product the value should be new_image=/i/m/image01.jpg. You expect Magento to copy the image to the product media folder.

Actual result

  1. Actually the attribute value is new_image=image01.jpg if you export the product again

Why is this attributed not treated the same way an image attribute created by the system?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: ImportExportIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions