code: func (svc *imageService) prepareReference(imageName string, options *copy.Options) (types.ImageReference, error) {
  	if imageName == "" {
  		return nil, storage.ErrNotAnImage
  	}
  
  	srcRef, err := alltransports.ParseImageName(imageName)
  	if err != nil {
  		if svc.defaultTransport == "" {
  			return nil, err
  		}
  		srcRef2, err2 := alltransports.ParseImageName(svc.defaultTransport + imageName)
  		if err2 != nil {
  			return nil, err
  		}
  		srcRef = srcRef2
  	}
  
  	if options.SourceCtx == nil {
  		options.SourceCtx = &types.SystemContext{}
  	}
  
  	if srcRef.DockerReference() != nil {
  		hostname := reference.Domain(srcRef.DockerReference())
  		if secure := svc.isSecureIndex(hostname); !secure {
  			options.SourceCtx.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!secure)
  		}
  	}
  	return srcRef, nil
  }
docs: // prepareReference creates an image reference from an image string and set options
  // for the source context